diff options
| author | t <t@tjp.lol> | 2026-12-01 20:01:12 -0700 |
|---|---|---|
| committer | t <t@tjp.lol> | 2026-12-04 13:53:47 -0700 |
| commit | ea36b1af7dc5e553b26c46b7dda2cb0dd5bcc2b7 (patch) | |
| tree | 00131171f081700b3b7cfa30009e31bf4042c507 /mise.toml | |
| parent | 7622522776168577d9f4bf7846e7f5052e2418e2 (diff) | |
Prepare the 0.1.0 LuaRocks release
Diffstat (limited to 'mise.toml')
| -rw-r--r-- | mise.toml | 39 |
1 files changed, 38 insertions, 1 deletions
@@ -1,10 +1,47 @@ [tasks.check] description = "Offline Antigravity provider acceptance check (macOS, fake account and CLI)" +dir = "{{config_root}}" run = ''' set -eu bin="${PANTO:-$(command -v panto)}" -luarocks lint panto-antigravity-scm-1.rockspec +luarocks lint ./*.rockspec "$bin" lua _quota_selfcheck.lua "$bin" lua check.lua PANTO_CHECK_ROCK=1 "$bin" lua check.lua ''' + +[tasks.version] +description = "Prepare a versioned rockspec for commit" +dir = "{{config_root}}" +usage = 'arg "<version>"' +run = ''' +set -eu +ver="$usage_version" +printf '%s\n' "$ver" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+$' || { echo 'expected x.y.z' >&2; exit 1; } +set -- ./*.rockspec +[ "$#" -eq 1 ] && [ -f "$1" ] || { echo 'expected one rockspec' >&2; exit 1; } +new="./panto-antigravity-$ver-1.rockspec" +[ "$new" != "$1" ] || exit 0 +sed -e "s/^version = .*/version = \"$ver-1\"/" -e "s/^ tag = .*/ tag = \"v$ver\",/" "$1" > "$new" +luarocks lint "$new" +rm "$1" +''' + +[tasks.release] +description = "Tag the committed release, push its tag and upload to LuaRocks" +dir = "{{config_root}}" +depends = ["check"] +run = ''' +set -eu +set -- ./panto-antigravity-*.rockspec +version=${1#./panto-antigravity-} +tag=v${version%-1.rockspec} +rev=${REV:-@-} +jj file show -r "$rev" "$1" | cmp - "$1" || { echo 'commit the rockspec first' >&2; exit 1; } +remotes=$(jj git remote list | awk '{print $1}') +[ -n "$remotes" ] || { echo 'configure the public source remote first' >&2; exit 1; } +[ -z "$(jj tag list "$tag")" ] || { echo "$tag already exists" >&2; exit 1; } +jj tag set "$tag" -r "$rev" +for remote in $remotes; do jj git push --remote "$remote" --tag "$tag"; done +luarocks upload "$1" +''' |
