File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 8
8
# - `gh`: Github CLI
9
9
# - `jq`: Command line JSON manipulation
10
10
# - `zip`: ZIP file creation
11
- # - `npx`: Run an NPM package
12
11
13
12
# The new version must be passed as the first argument
14
13
if [[ -z " $1 " ]]; then
@@ -25,18 +24,18 @@ if ! [[ -z "$(git status --porcelain)" ]]; then
25
24
fi
26
25
27
26
# 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
29
28
30
29
# 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 += [
32
31
{
33
32
\" Version\" : \" $version \" ,
34
33
\" 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
+ }
36
37
}
37
- ]" `
38
- echo $meta > assets/metadata.json
39
- npx prettier --write assets/metadata.json
38
+ ]" --indent 2 | tee assets/metadata.json
40
39
41
40
echo " [info] Updated version"
42
41
Original file line number Diff line number Diff line change 1
- VERSION = 0.1 .1
1
+ VERSION = " 0.1.1"
2
2
3
3
-- prettier
4
4
-- A micro plugin that automatically formats files using prettier on save
You can’t perform that action at this time.
0 commit comments