Document release process and update some just recipes (#3460)

This commit is contained in:
Jack Amadeo
2025-07-16 17:06:20 -04:00
committed by GitHub
parent 2a89c89bb2
commit a5daae50ce
2 changed files with 36 additions and 10 deletions
+9 -10
View File
@@ -281,12 +281,11 @@ install-deps:
cd ui/desktop && npm install
cd documentation && yarn
# ensure the current branch is "main" or error
ensure-main:
ensure-release-branch:
#!/usr/bin/env bash
branch=$(git rev-parse --abbrev-ref HEAD); \
if [ "$branch" != "main" ]; then \
echo "Error: You are not on the main branch (current: $branch)"; \
if [[ ! "$branch" == release/* ]]; then \
echo "Error: You are not on a release branch (current: $branch)"; \
exit 1; \
fi
@@ -294,7 +293,7 @@ ensure-main:
git fetch
# @{u} refers to upstream branch of current branch
if [ "$(git rev-parse HEAD)" != "$(git rev-parse @{u})" ]; then \
echo "Error: Your branch is not up to date with the upstream main branch"; \
echo "Error: Your branch is not up to date with the upstream branch"; \
echo " ensure your branch is up to date (git pull)"; \
exit 1; \
fi
@@ -316,7 +315,7 @@ validate version:
fi
# set cargo and app versions, must be semver
release version: ensure-main
prepare-release version:
@just validate {{ version }} || exit 1
@git switch -c "release/{{ version }}"
@@ -334,8 +333,8 @@ release version: ensure-main
get-tag-version:
@uvx --from=toml-cli toml get --toml-path=Cargo.toml "workspace.package.version"
# create the git tag from Cargo.toml, must be on main
tag: ensure-main
# create the git tag from Cargo.toml, checking we're on a release branch
tag: ensure-release-branch
git tag v$(just get-tag-version)
# create tag and push to origin (use this when release branch is merged to main)
@@ -344,9 +343,9 @@ tag-push: tag
git push origin tag v$(just get-tag-version)
# generate release notes from git commits
release-notes:
release-notes old:
#!/usr/bin/env bash
git log --pretty=format:"- %s" v$(just get-tag-version)..HEAD
git log --pretty=format:"- %s" {{ old }}..v$(just get-tag-version)
### s = file seperator based on OS
s := if os() == "windows" { "\\" } else { "/" }