Author:
Hash:
Timestamp:
+33 -0 +/-3 browse
Kevin Schoon [me@kevinschoon.com]
1e35453c54062c0afb6e3b17101ba4b93d82a422
Sat, 29 Aug 2026 21:51:03 +0000 (2 weeks ago)
| 1 | diff --git a/.gitignore b/.gitignore |
| 2 | index 507396a..57e2767 100644 |
| 3 | --- a/.gitignore |
| 4 | +++ b/.gitignore |
| 5 | @@ -22,3 +22,4 @@ mkosi.output |
| 6 | dist/completion/* |
| 7 | dist/man/* |
| 8 | !dist/man/.gitkeep |
| 9 | + ayllu-release-*.txt |
| 10 | diff --git a/scripts/check_build_dependencies.sh b/scripts/check_build_dependencies.sh |
| 11 | index 760aa36..22e0a83 100755 |
| 12 | --- a/scripts/check_build_dependencies.sh |
| 13 | +++ b/scripts/check_build_dependencies.sh |
| 14 | @@ -29,6 +29,7 @@ check_library() { |
| 15 | } |
| 16 | |
| 17 | check_cmd "cargo" |
| 18 | + check_cmd "cargo-set-version" |
| 19 | check_cmd "cc" |
| 20 | # check_cmd "djlint" # format / lint jinja html templates |
| 21 | # check_cmd "fc-list" # fontconfig |
| 22 | diff --git a/scripts/release.sh b/scripts/release.sh |
| 23 | new file mode 100755 |
| 24 | index 0000000..b4a9563 |
| 25 | --- /dev/null |
| 26 | +++ b/scripts/release.sh |
| 27 | @@ -0,0 +1,31 @@ |
| 28 | + #!/usr/bin/env sh |
| 29 | + # Tag a new release of Ayllu |
| 30 | + |
| 31 | + if [ -z "$1" ] ; then |
| 32 | + printf "Usage: release.sh VERSION\n" |
| 33 | + exit 1 |
| 34 | + fi |
| 35 | + |
| 36 | + check_dirty() { |
| 37 | + git diff --quiet || { |
| 38 | + printf "Repository is dirty, commit all changes first.\n" |
| 39 | + exit 1 |
| 40 | + } |
| 41 | + } |
| 42 | + |
| 43 | + CRATE_VERSION="$1" |
| 44 | + cargo set-version "$CRATE_VERSION" 1>/dev/null |
| 45 | + |
| 46 | + check_dirty || { |
| 47 | + echo "Some crates were updated to $CRATE_VERSION" |
| 48 | + echo "Verify the changes and then run git add --all && git commit -m 'bump version to $CRATE_VERSION'" |
| 49 | + exit 1 |
| 50 | + } |
| 51 | + |
| 52 | + TMP_ANNOTATE_PATH="ayllu-release-$CRATE_VERSION.txt" |
| 53 | + PREVIOUS_TAG="$(git describe --tags --abbrev=0)" |
| 54 | + printf "Release Ayllu version: %s\n\n" "$CRATE_VERSION" > "$TMP_ANNOTATE_PATH" |
| 55 | + git --no-pager log --oneline --no-merges "$PREVIOUS_TAG..HEAD" >> "$TMP_ANNOTATE_PATH" |
| 56 | + |
| 57 | + echo "Edit release description $TMP_ANNOTATE_PATH and once you are ready run:" |
| 58 | + echo git tag --sign --edit -a "$CRATE_VERSION" -F "$TMP_ANNOTATE_PATH" |