diff options
| author | Oskar <oskar@mullvad.net> | 2025-10-27 12:00:49 +0100 |
|---|---|---|
| committer | Oskar <oskar@mullvad.net> | 2025-10-28 09:50:35 +0100 |
| commit | 451cd03e031db4be69d3a4d113e8eac0872fe03a (patch) | |
| tree | f5d678338e69eb0c7e0a9254e0e23583840893fa /desktop/scripts | |
| parent | 79c2656ec0f163750bc3707310776224fcfaaa46 (diff) | |
| download | mullvadvpn-451cd03e031db4be69d3a4d113e8eac0872fe03a.tar.xz mullvadvpn-451cd03e031db4be69d3a4d113e8eac0872fe03a.zip | |
Make --draft a non-default option to 4-make-release
This changes the script from only creating draft releases to defaulting
to final releases. It's still possible to create a draft release by
adding the --draft flag.
Diffstat (limited to 'desktop/scripts')
| -rwxr-xr-x | desktop/scripts/release/4-make-release | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/desktop/scripts/release/4-make-release b/desktop/scripts/release/4-make-release index 051d8766a9..896e62f7f8 100755 --- a/desktop/scripts/release/4-make-release +++ b/desktop/scripts/release/4-make-release @@ -8,6 +8,14 @@ set -eu SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd "$SCRIPT_DIR" +DRAFT="false" +while [[ "$#" -gt 0 ]]; do + case $1 in + --draft) DRAFT="true";; + esac + shift +done + REPO_ROOT=../../../ PRODUCT_VERSION_PATH=$REPO_ROOT/dist-assets/desktop-product-version.txt PRODUCT_VERSION=$(cat $PRODUCT_VERSION_PATH) @@ -37,13 +45,16 @@ function publish_release { awk 'NF { last = last ? last ORS $0 : $0 } END { print last }') release_flags=( - --draft --repo "git@github.com:mullvad/mullvadvpn-app" --verify-tag --notes-file - --title "$PRODUCT_VERSION" ) + if [[ "$DRAFT" == "true" ]]; then + release_flags+=(--draft) + fi + previous_release=$(echo "$changelog_extract" | tail -1 | grep -oP '## \[\K[^\]]+') body="This release is for desktop only." @@ -79,7 +90,9 @@ function publish_release { # shellcheck disable=SC2046 gh release create "${release_flags[@]}" "$PRODUCT_VERSION" $(printf "%s " "$ARTIFACT_DIR"/*) < "$tmp_changelog_file" - log_success "\nThe above URL contains the text \"untagged\", but don't worry it is tagged properly and everything will look correct once it's published." + if [[ "$DRAFT" == "true" ]]; then + log_success "\nThe above URL contains the text \"untagged\", but don't worry it is tagged properly and everything will look correct once it's published." + fi } ./download-release-artifacts "$PRODUCT_VERSION" "$ARTIFACT_DIR" |
