Skip to content

Commit

Permalink
chore: Add Justfile for release automation
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Oct 19, 2024
1 parent 6f9a3b2 commit 4e1aff0
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
set ignore-comments := true
set shell := ["zsh", "+o", "nomatch", "-ecu"]
set unstable := true
set script-interpreter := ["zsh", "+o", "nomatch", "-eu"]

_default:
@just --list --unsorted

[private]
[doc('Block execution if Git working tree isn’t pristine.')]
pristine:
# Ensure there are no changes in staging
git diff-index --quiet --cached HEAD || exit 1
# Ensure there are no changes in the working tree
git diff-files --quiet || exit 1

release semver: pristine
make rockspecs/decasify-{{semver}}-1.rockspec rockspecs/decasify.nvim-{{semver}}-1.rockspec
git add action.yml README.md rockspecs/decasify-{{semver}}-1.rockspec rockspecs/decasify.nvim-{{semver}}-1.rockspec
git commit -m "chore: Release v{{semver}}"
git tag v{{semver}}
git push --atomic upstream master v{{semver}}
luarocks pack rockspecs/decasify-{{semver}}-1.rockspec
luarocks pack rockspecs/decasify.nvim-{{semver}}-1.rockspec
gh release create v{{semver}} -t "Decasify v{{semver}}" decasify-{{semver}}-1.src.rock decasify.nvim-{{semver}}-1.src.rock

# vim: set ft=just

0 comments on commit 4e1aff0

Please sign in to comment.