Skip to content

Commit e4aca5e

Browse files
committed
fix: use string as version number
1 parent 9ab1b4c commit e4aca5e

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

scripts/release

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
# - `gh`: Github CLI
99
# - `jq`: Command line JSON manipulation
1010
# - `zip`: ZIP file creation
11-
# - `npx`: Run an NPM package
1211

1312
# The new version must be passed as the first argument
1413
if [[ -z "$1" ]]; then
@@ -25,18 +24,18 @@ if ! [[ -z "$(git status --porcelain)" ]]; then
2524
fi
2625

2726
# Change the version in `source/prettier.lua`
28-
sed -i "s/^VERSION = .*/VERSION = $version/" source/prettier.lua
27+
sed -i "s/^VERSION = .*/VERSION = \"$version\"/" source/prettier.lua
2928

3029
# Add a new entry to `assets/metadata.json`
31-
meta=`cat assets/metadata.json | jq ".[0].Versions += [
30+
cat assets/metadata.json | jq ".[0].Versions += [
3231
{
3332
\"Version\": \"$version\",
3433
\"Url\": \"https://github.com/gamemaker1/micro-plugin-prettier/releases/download/$version/prettier.zip\",
35-
\"Require\": { \"micro\": \">=1.0.3\" }
34+
\"Require\": {
35+
\"micro\": \">=1.0.3\"
36+
}
3637
}
37-
]"`
38-
echo $meta > assets/metadata.json
39-
npx prettier --write assets/metadata.json
38+
]" --indent 2 | tee assets/metadata.json
4039

4140
echo "[info] Updated version"
4241

source/prettier.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION = 0.1.1
1+
VERSION = "0.1.1"
22

33
-- prettier
44
-- A micro plugin that automatically formats files using prettier on save

0 commit comments

Comments
 (0)