Skip to content

Commit

Permalink
feat: moved version updating out of package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
CEbbinghaus committed Dec 8, 2023
1 parent f940d11 commit c06fbf9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ jobs:

- name: Update Version
run: |
echo "-$(git rev-parse --short HEAD)" >> version
echo -n "-$(git rev-parse --short HEAD)" >> version && \
node util/updateVersion.js package.json lib/package.json
- name: Download Decky CLI
run: |
Expand Down Expand Up @@ -66,7 +67,8 @@ jobs:

- name: Update Version
run: |
echo "-$(git rev-parse --short HEAD)" >> version
echo -n "-$(git rev-parse --short HEAD)" >> version && \
node util/updateVersion.js package.json lib/package.json
- uses: actions/setup-node@v3
with:
Expand Down
4 changes: 4 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ has_sudo() {

PluginName=$(basename "$PWD")

node util/updateVersion.js package.json lib/package.json

echo "Building plugin $PluginName..."

mkdir -p build
Expand Down Expand Up @@ -43,3 +45,5 @@ if [[ "$*" != *"--skip-copy"* ]]; then
sudo cp -r build/ /home/deck/homebrew/plugins/$PluginName
sudo chmod 555 /home/deck/homebrew/plugins/$PluginName
fi

node util/resetVersion.js package.json lib/package.json
5 changes: 1 addition & 4 deletions lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@
"dist"
],
"scripts": {
"prebuild": "node ../util/updateVersion.js",
"build": "tsc",
"postbuild": "node ../util/resetVersion.js",
"watch": "tsc -w",
"prepack": "node ../util/updateVersion.js"
"watch": "tsc -w"
},
"repository": {
"type": "git",
Expand Down
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
"author": "Christopher-Robin <git@cebbinghaus.com>",
"license": "GPL-2.0",
"scripts": {
"prebuild": "node util/updateVersion.js",
"build": "shx rm -rf dist && rollup -c",
"postbuild": "node util/resetVersion.js",
"watch": "rollup -c -w"
},
"bugs": {
Expand Down

0 comments on commit c06fbf9

Please sign in to comment.