#184 Win32 working as well

This commit is contained in:
Tommy Mikkelsen 2020-10-17 22:39:02 +02:00
parent b68655b9b8
commit 8f5fd05036
2 changed files with 13 additions and 3 deletions

View file

@ -7,14 +7,14 @@
"license": "MPL-2.0", "license": "MPL-2.0",
"homepage": "https://github.com/WebTools-NG/WebTools-NG", "homepage": "https://github.com/WebTools-NG/WebTools-NG",
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "run-script-os", "serve": "run-script-os",
"serve:darwin:linux": "chmod +x script/getGitVer.sh && . script/getGitVer.sh && vue-cli-service electron:serve && unset AppRev", "serve:darwin:linux": "chmod +x script/getGitVer.sh && . script/getGitVer.sh && vue-cli-service electron:serve && unset AppRev",
"serve:win32": "vue-cli-service electron:serve", "serve:win32": "vue-cli-service electron:serve",
"build": "run-script-os", "build": "run-script-os",
"build:darwin:linux": "chmod +x script/getGitVer.sh && . script/getGitVer.sh && vue-cli-service electron:build && unset AppRev", "build:darwin:linux": "chmod +x script/getGitVer.sh && . script/getGitVer.sh && vue-cli-service electron:build && unset AppRev",
"build:win32": "vue-cli-service electron:build", "build:win32": "script\\getGitVer.cmd && vue-cli-service electron:build",
"lint": "vue-cli-service lint", "lint": "vue-cli-service lint",
"electron:build": "vue-cli-service electron:build", "electron:build": "vue-cli-service electron:build",
"electron:serve": "vue-cli-service electron:serve", "electron:serve": "vue-cli-service electron:serve",

10
script/getGitVer.cmd Normal file
View file

@ -0,0 +1,10 @@
@echo off
: Export rev to env, for the artifact
FOR /F "tokens=*" %%g IN ('git rev-parse --short HEAD') do (SET AppRev=%%g)
: Get git root directory
FOR /F "tokens=*" %%h IN ('git rev-parse --show-toplevel') do (SET root=%%h)
: get commit hash for version file
set rev={"rev":"%AppRev%"}
: Save to version file
echo %rev% > %root%/public/version.json