summaryrefslogtreecommitdiffhomepage
path: root/desktop/scripts
diff options
context:
space:
mode:
authorOskar <oskar@mullvad.net>2025-10-27 12:23:36 +0100
committerOskar <oskar@mullvad.net>2025-10-28 12:04:58 +0100
commitfdc837275d0d20222b847b6965ed1333794ee6c3 (patch)
treedcd44d462554fd78ee2854f3db0b7679405b8db3 /desktop/scripts
parentf1f96ae323a7a355a773a4e66f35d0e83d1265b7 (diff)
downloadmullvadvpn-fdc837275d0d20222b847b6965ed1333794ee6c3.tar.xz
mullvadvpn-fdc837275d0d20222b847b6965ed1333794ee6c3.zip
Add script that publishes to the linux repositories over ssh
Diffstat (limited to 'desktop/scripts')
-rw-r--r--desktop/scripts/release/6-publish-linux-repositories44
-rwxr-xr-xdesktop/scripts/release/publish-metadata-to-api1
2 files changed, 45 insertions, 0 deletions
diff --git a/desktop/scripts/release/6-publish-linux-repositories b/desktop/scripts/release/6-publish-linux-repositories
new file mode 100644
index 0000000000..970e41ba00
--- /dev/null
+++ b/desktop/scripts/release/6-publish-linux-repositories
@@ -0,0 +1,44 @@
+#!/usr/bin/env bash
+
+set -eu
+
+SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+cd "$SCRIPT_DIR"
+
+REPO_ROOT=../../../
+PRODUCT_VERSION_PATH=$REPO_ROOT/dist-assets/desktop-product-version.txt
+PRODUCT_VERSION=$(cat $PRODUCT_VERSION_PATH)
+
+$REPO_ROOT/scripts/utils/commit-verification
+"$SCRIPT_DIR/verify-version-is-release"
+
+if [ $# -ne 1 ]; then
+ echo "Please provide the following arguments:"
+ echo " $(basename "$0") \\"
+ echo " <build server SSH destination>"
+ exit 1
+fi
+
+# shellcheck source=desktop/scripts/release/release-config.sh
+source "$SCRIPT_DIR/release-config.sh"
+
+# The hostname (can be the alias in your ~/.ssh/config) of the build server
+BUILD_SERVER_HOST=$1
+
+source $REPO_ROOT/scripts/utils/log
+
+function run_on_build_server {
+ # This should be expanded client side
+ # shellcheck disable=SC2029
+ ssh "$BUILD_SERVER_HOST" "$@"
+}
+
+function run_on_build_server_as_build_user {
+ run_on_build_server sudo -i -u "$BUILDSERVER_BUILDUSER" "$@"
+}
+
+run_on_build_server_as_build_user \
+ "autobuild-linux/publish-app-to-repositories.sh" \
+ --production \
+ "autobuild-linux/artifacts/$PRODUCT_VERSION" \
+ "$PRODUCT_VERSION"
diff --git a/desktop/scripts/release/publish-metadata-to-api b/desktop/scripts/release/publish-metadata-to-api
index 20afe25bc4..9a56f68ee8 100755
--- a/desktop/scripts/release/publish-metadata-to-api
+++ b/desktop/scripts/release/publish-metadata-to-api
@@ -28,6 +28,7 @@ RSYNC_OPTIONS=(-av --mkpath)
METADATA_SERVER_RSYNC_OPTIONS=("${RSYNC_OPTIONS[@]}" '--rsh="ssh -p 1122"')
function run_on_build_server {
+ # This should be expanded client side
# shellcheck disable=SC2029
ssh "$BUILD_SERVER_HOST" "$@"
}