diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-03-27 22:50:05 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-03-27 22:51:25 +0300 |
| commit | 4955dd6024f0642e989302df8621c5197e7023db (patch) | |
| tree | 617a213c7182b374449b69dc8364962624cf7695 /justfile | |
| parent | 9aa50f04a9d5724cda773d609cf9a9154a01f256 (diff) | |
harden release workflow: musl builds, --locked, version check, portable sed
Diffstat (limited to 'justfile')
| -rw-r--r-- | justfile | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -24,6 +24,24 @@ clean-tests: @rm -f tests/integration/results/*.json tests/integration/results/*.txt 2>/dev/null || true @echo "cleaned" +# Bump version, commit, tag, push, trigger release build (usage: just release 0.1.1) +release version: + @if [ -n "$(git status --porcelain)" ]; then \ + echo "error: commit your changes first"; \ + exit 1; \ + fi + @if git rev-parse "v{{version}}" >/dev/null 2>&1; then \ + echo "error: tag v{{version}} already exists"; \ + exit 1; \ + fi + sed -i.bak 's/^version = ".*"/version = "{{version}}"/' Cargo.toml && rm -f Cargo.toml.bak + cargo test --quiet + git add Cargo.toml Cargo.lock + git commit -m "release: v{{version}}" + git tag v{{version}} + git push --follow-tags + @echo "v{{version}} released — GitHub Actions building binaries" + # Print default config default-config: cargo run --release -- --default-config |
