summaryrefslogtreecommitdiffhomepage
path: root/desktop/scripts
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2025-08-29 12:03:03 +0200
committerDavid Lönnhager <david.l@mullvad.net>2025-09-03 09:27:58 +0200
commit97137feef803aba0464b897b989034c75c9860d4 (patch)
tree51698018a5fad74f37bbef2179ede6f569053cc3 /desktop/scripts
parent46dfafc5b8fc42d05efc9355c6bbab8515595853 (diff)
downloadmullvadvpn-97137feef803aba0464b897b989034c75c9860d4.tar.xz
mullvadvpn-97137feef803aba0464b897b989034c75c9860d4.zip
Add script for publishing latest versions metadata (latest.json)
Diffstat (limited to 'desktop/scripts')
-rwxr-xr-xdesktop/scripts/release/5-update-and-publish-metadata33
1 files changed, 24 insertions, 9 deletions
diff --git a/desktop/scripts/release/5-update-and-publish-metadata b/desktop/scripts/release/5-update-and-publish-metadata
index 1019c49c2b..8124dbc47c 100755
--- a/desktop/scripts/release/5-update-and-publish-metadata
+++ b/desktop/scripts/release/5-update-and-publish-metadata
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# This script downloads the build artifacts along with the signatures, verifies the signatures and
-# publishes new version metadata to Mullvads API.
+# publishes new version metadata to Mullvads API (including latest.json).
# * This should be run after `4-make-release`.
# * You need to put the private ed25519 signing key in the clipboard before running this script.
@@ -34,19 +34,26 @@ function publish_metadata {
local platforms
platforms=(windows macos linux)
local signed_dir="signed/"
+ local work_dir="work/"
+ local published_dir="currently_published/"
+ local upload_dir="upload/"
+ local latest_path="latest.json"
- rm -rf currently_published/
+ rm -rf "$signed_dir"
+ rm -rf "$upload_dir"
+ rm -rf "$published_dir"
echo ">>> Fetching current version metadata"
- mullvad-release pull --assume-yes "${platforms[@]}"
+ mullvad-release pull --assume-yes --latest-file "${platforms[@]}"
echo ""
echo ">>> Backing up released data"
- cp -r $signed_dir currently_published/
+ cp -r $signed_dir $published_dir
+ cp "$latest_path" "$published_dir"
echo ""
- echo ">>> Replacing work/ directory with latest published data"
- cp -rf signed/ work/
+ echo ">>> Replacing $work_dir directory with latest published data"
+ cp -rf "$signed_dir" "$work_dir"
echo ""
echo ">>> Adding new release $PRODUCT_VERSION (rollout = 1)"
@@ -61,12 +68,20 @@ function publish_metadata {
mullvad-release verify "${platforms[@]}"
echo ""
+ echo ">>> Creating upload dir"
+ cp -rf "$signed_dir" "$upload_dir"
+ echo ""
+
+ echo ">>> Generating $latest_path for current version metadata"
+ mullvad-release query-latest "${platforms[@]}" > "$upload_dir/$latest_path"
+ echo ""
+
echo ">>> New metadata including $PRODUCT_VERSION"
- git --no-pager diff --no-index -- currently_published/ $signed_dir || true
+ git --no-pager diff --no-index -- $published_dir $upload_dir || true
echo ""
- read -rp "Press enter to upload if the diff looks good "
- ./publish-metadata-to-api $signed_dir "$BUILDSERVER_HOST" "$METADATA_SERVER_HOST"
+ read -rp "Press enter to upload if the diffs look good "
+ ./publish-metadata-to-api $upload_dir "$BUILDSERVER_HOST" "$METADATA_SERVER_HOST"
}
function remove_release_artifacts {