summaryrefslogtreecommitdiffhomepage
path: root/desktop/scripts
diff options
context:
space:
mode:
authorOskar <oskar@mullvad.net>2025-10-27 08:01:31 +0100
committerOskar <oskar@mullvad.net>2025-10-27 16:51:44 +0100
commit759b2d29716b59743f611a4c81498a16ec3c3a13 (patch)
tree7c1011c44828f6664e77177c6765135e5db7a735 /desktop/scripts
parent8d210ef53bc3d6ee67ae644c2cd96c434239ce2c (diff)
downloadmullvadvpn-759b2d29716b59743f611a4c81498a16ec3c3a13.tar.xz
mullvadvpn-759b2d29716b59743f611a4c81498a16ec3c3a13.zip
Improve commit verification in release scripts
Diffstat (limited to 'desktop/scripts')
-rwxr-xr-xdesktop/scripts/release/1-prepare-release13
-rwxr-xr-xdesktop/scripts/release/2-create-and-push-tag3
-rwxr-xr-xdesktop/scripts/release/3-verify-build1
3 files changed, 5 insertions, 12 deletions
diff --git a/desktop/scripts/release/1-prepare-release b/desktop/scripts/release/1-prepare-release
index b76487d5cb..1a0fc302bb 100755
--- a/desktop/scripts/release/1-prepare-release
+++ b/desktop/scripts/release/1-prepare-release
@@ -10,10 +10,11 @@ cd "$SCRIPT_DIR"
REPO_ROOT=../../../
+$REPO_ROOT/scripts/utils/commit-verification
+
source $REPO_ROOT/scripts/utils/log
source $REPO_ROOT/scripts/utils/print-and-run
-
for argument in "$@"; do
case "$argument" in
-*)
@@ -48,15 +49,6 @@ function checks {
fi
}
-function check_commit_signature {
- if ! git verify-commit HEAD; then
- log_error \
- "Current commit lacks valid signature. Releases can only be made from signed commits."
- exit 1
- fi
- echo ""
-}
-
function check_changelog {
previous_version=$(grep -oP '## \[\K[^\]]+' $changelog_path | head -2 | tail -1)
@@ -104,7 +96,6 @@ function update_product_version {
}
checks
-check_commit_signature
check_changelog
update_changelog
update_copyright_year
diff --git a/desktop/scripts/release/2-create-and-push-tag b/desktop/scripts/release/2-create-and-push-tag
index 17ff71edd6..eebec4e4e2 100755
--- a/desktop/scripts/release/2-create-and-push-tag
+++ b/desktop/scripts/release/2-create-and-push-tag
@@ -12,6 +12,8 @@ PRODUCT_VERSION_PATH=$REPO_ROOT/dist-assets/desktop-product-version.txt
PRODUCT_VERSION=$(cat $PRODUCT_VERSION_PATH)
BASE_URL="https://releases.mullvad.net/desktop/releases/$PRODUCT_VERSION"
+$REPO_ROOT/scripts/utils/commit-verification
+
source $REPO_ROOT/scripts/utils/print-and-run
source $REPO_ROOT/scripts/utils/log
@@ -53,7 +55,6 @@ function wait_for_build {
log_success "\nAll artifacts are now available"
}
-git verify-commit HEAD
push_tag
log_success "Follow build progress here: $BASE_URL"
diff --git a/desktop/scripts/release/3-verify-build b/desktop/scripts/release/3-verify-build
index 89dcc4dce3..f9f07f24e9 100755
--- a/desktop/scripts/release/3-verify-build
+++ b/desktop/scripts/release/3-verify-build
@@ -14,6 +14,7 @@ PRODUCT_VERSION_PATH=$REPO_ROOT/dist-assets/desktop-product-version.txt
PRODUCT_VERSION=$(cat $PRODUCT_VERSION_PATH)
$REPO_ROOT/scripts/utils/gh-ready-check
+$REPO_ROOT/scripts/utils/commit-verification
"$SCRIPT_DIR/verify-version-is-release"
source $REPO_ROOT/scripts/utils/log