diff --git a/build/ci_bundle.sh b/build/ci_bundle.sh index 460fa5f..3acbaff 100644 --- a/build/ci_bundle.sh +++ b/build/ci_bundle.sh @@ -27,7 +27,7 @@ # - rolens-windows-2022-arm64.zip # -node ./build/version2file.js +node ./build/version_to_file.js version=$(<./build/version.txt) mkdir bundle diff --git a/build/version2file.js b/build/version_to_file.js similarity index 84% rename from build/version2file.js rename to build/version_to_file.js index a2a23e8..54feb95 100644 --- a/build/version2file.js +++ b/build/version_to_file.js @@ -3,7 +3,9 @@ // This script extracts the version number from wails.json in the project root // and writes it to version.txt -require('fs').writeFileSync( +const fs = require('fs'); + +fs.writeFileSync( __dirname + '/version.txt', JSON.parse( fs.readFileSync(__dirname + '/../wails.json') diff --git a/wails.json b/wails.json index b78539f..3d066df 100644 --- a/wails.json +++ b/wails.json @@ -18,6 +18,6 @@ "copyright": "© Romein van Buren 2023 (GNU GPL 3.0)." }, "preBuildHooks": { - "*/*": "node ../version2file.js" + "*/*": "node ../version_to_file.js" } }