[kde-linux/kde-linux] /: lock resource while uploading

Harald Sitter <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 4a2dfb3c9a17acee3a129e34772fa12e0e5761c7 by Harald Sitter.
Committed on 02/08/2026 at 13:22.
Pushed by sitter into branch 'master'.

lock resource while uploading

M  +19   -0    upload.sh

https://invent.kde.org/kde-linux/kde-linux/-/commit/4a2dfb3c9a17acee3a129e34772fa12e0e5761c7

diff --git a/upload.sh b/upload.sh
index edae13f5..7e5add89 100755
--- a/upload.sh
+++ b/upload.sh
@@ -37,6 +37,25 @@ fi
 
 OUTDIR=mkosi.output
 
+export PUBLISH_DIR="testing"
+if [ "${CI_COMMIT_BRANCH:-}" != "testing-buildstream" ]; then
+    export PUBLISH_DIR="testing-buildstream"
+fi
+
+PUBLISH_RESOURCE_HOLDER_PID=""
+function finish {
+    set +e
+    if [ "$PUBLISH_RESOURCE_HOLDER_PID" != "" ]; then
+        kill ${PUBLISH_RESOURCE_HOLDER_PID} || true
+    fi
+}
+trap finish EXIT INT ABRT TERM
+
+curl https://resources.kde-linux.haraldsitter.eu/v1/locks
+git clone https://invent.kde.org/sitter/kde-linux-resource-semaphore
+kde-linux-resource-semaphore/resource-holder --resource image-storage-$PUBLISH_DIR &
+PUBLISH_RESOURCE_HOLDER_PID=$!
+
 # For the vacuum helper and this script
 export SSH_IDENTITY="$PWD/.secure_files/ssh.key"
 export SSH_USER=kdeos
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.