diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dc5d689..6e2f7f8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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: | @@ -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: diff --git a/build.sh b/build.sh index 47914dc..fb8fd9a 100755 --- a/build.sh +++ b/build.sh @@ -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 @@ -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 \ No newline at end of file diff --git a/lib/package.json b/lib/package.json index 9547eb4..deff227 100644 --- a/lib/package.json +++ b/lib/package.json @@ -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", diff --git a/package.json b/package.json index a43e625..0b714db 100644 --- a/package.json +++ b/package.json @@ -13,9 +13,7 @@ "author": "Christopher-Robin ", "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": {