Skip to content

Commit

Permalink
fix: Release workflow ⚓
Browse files Browse the repository at this point in the history
  • Loading branch information
gabyx committed Apr 21, 2024
1 parent ee2b532 commit c6d423c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion nix/pkgs/version.json
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
{ "version": "3.0.0" }
{
"version": "3.0.0-rc1"
}
2 changes: 1 addition & 1 deletion scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c6d423c

Please sign in to comment.