mirror of
https://github.com/WebTools-NG/WebTools-NG
synced 2024-11-22 02:53:05 +00:00
#184 Win32 working as well
This commit is contained in:
parent
b68655b9b8
commit
8f5fd05036
2 changed files with 13 additions and 3 deletions
|
@ -7,14 +7,14 @@
|
|||
"license": "MPL-2.0",
|
||||
"homepage": "https://github.com/WebTools-NG/WebTools-NG",
|
||||
"private": true,
|
||||
|
||||
"scripts": {
|
||||
"serve": "run-script-os",
|
||||
"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",
|
||||
"build": "run-script-os",
|
||||
"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",
|
||||
"electron:build": "vue-cli-service electron:build",
|
||||
"electron:serve": "vue-cli-service electron:serve",
|
||||
|
|
10
script/getGitVer.cmd
Normal file
10
script/getGitVer.cmd
Normal 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
|
Loading…
Reference in a new issue