summaryrefslogtreecommitdiff
path: root/mise.toml
diff options
context:
space:
mode:
authort <t@tjp.lol>2026-09-24 11:50:24 -0600
committert <t@tjp.lol>2026-09-24 11:50:24 -0600
commit413a5e5f8170c358457e7da411385b4bece03670 (patch)
treebd36d54cac4bcc60cfb6a82794d1712c277d5a09 /mise.toml
parent74ba47bac966bb4b5f3f9b418cd33ae125a3fc55 (diff)
Fix rockspec rewriting in the version task
The task body is a TOML literal string, so its backslashes reach the shell verbatim. Escapes written for a basic string doubled up: the package-name sed matched a literal backslash and the rockspec sed split into bogus file arguments, failing before any rockspec was written.
Diffstat (limited to 'mise.toml')
-rw-r--r--mise.toml6
1 files changed, 3 insertions, 3 deletions
diff --git a/mise.toml b/mise.toml
index 989809a..dd060b5 100644
--- a/mise.toml
+++ b/mise.toml
@@ -21,11 +21,11 @@ run = '''
set -eu
NEW="{{arg(name='version')}}"
SPEC="$(ls -1 ./*.rockspec)"
-PKG="$(sed -n 's/^package = "\\(.*\\)"/\\1/p' "$SPEC")"
+PKG="$(sed -n 's/^package = "\(.*\)"/\1/p' "$SPEC")"
NEWSPEC="./$PKG-$NEW-1.rockspec"
TMP="$(mktemp)"
-sed -e "s/^version = \\\".*\\\"/version = \\\"$NEW-1\\\"/" \\\
- -e "s/^\\( *\\)tag = \\\"v[^\\\"]*\\\"/\\1tag = \\\"v$NEW\\\"/" "$SPEC" > "$TMP"
+sed -e "s/^version = \".*\"/version = \"$NEW-1\"/" \
+ -e "s/^\( *\)tag = \"v[^\"]*\"/\1tag = \"v$NEW\"/" "$SPEC" > "$TMP"
mv "$TMP" "$NEWSPEC"
[ "$SPEC" = "$NEWSPEC" ] || rm -f "$SPEC"
luarocks lint "$NEWSPEC"