From 535b474d65a302143bce1333efd47449662fabaf Mon Sep 17 00:00:00 2001 From: Romein van Buren Date: Thu, 22 Jun 2023 21:06:20 +0200 Subject: [PATCH] Fixed version_to_file script --- build/ci_bundle.sh | 2 +- build/{version2file.js => version_to_file.js} | 4 +++- wails.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) rename build/{version2file.js => version_to_file.js} (84%) 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" } }