diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6c24a0cf..8d136438 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -69,13 +69,18 @@ jobs: echo "Release-Branch trailer is wrong." exit 1 } + [ -n "$RELEASE_BRANCH" ] || { + echo "Release-Branch trailer is empty." + exit 1 + } fi + # Fetch the branch. git fetch --depth 50 origin "$RELEASE_BRANCH" # Check if its reachable. [ -n "$(git rev-list --first-parent \ - --ancestry-path + --ancestry-path \ "$RELEASE_TAG^..origin/$RELEASE_BRANCH")" ] || { echo "Tag is not reachable from '$RELEASE_BRANCH' (--first-parent) !" >&2 exit 1 diff --git a/nix/pkgs/version.json b/nix/pkgs/version.json index f339f7b9..80cc1aad 100644 --- a/nix/pkgs/version.json +++ b/nix/pkgs/version.json @@ -1 +1,3 @@ -{ "version": "3.0.0" } +{ + "version": "3.0.0-rc1" +} diff --git a/scripts/release.sh b/scripts/release.sh index cddb8bac..2a44a7c1 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -34,7 +34,7 @@ function commit_version_file() { jq ".version |= \"$version\"" nix/pkgs/version.json >"$temp" mv "$temp" nix/pkgs/version.json - if git diff --quiet --exit-code; then + if ! git diff --quiet --exit-code; then git add nix/pkgs/version.json git commit -m "np: Update version to '$version'" fi