build version

This commit is contained in:
Freddie Wang
2021-04-06 13:29:38 +08:00
parent 13d7f74e24
commit 1f5ec0628f
3 changed files with 15 additions and 7 deletions

View File

@@ -3,11 +3,11 @@
mkdir -p build
regex='VERSION = '"'"'(.*)'"'"''
[[ $(cat ./src/util/Consts.ts) =~ $regex ]]
[[ $(cat ./src/utils/Consts.ts) =~ $regex ]]
VERSION=${BASH_REMATCH[1]}
echo "Building Version $VERSION for arm64"
echo "Building Version $VERSION for Arm"
echo "NPM Install"
npm ci

View File

@@ -2,7 +2,12 @@
mkdir -p build
echo "Building Linux Version"
regex='VERSION = '"'"'(.*)'"'"''
[[ $(cat ./src/utils/Consts.ts) =~ $regex ]]
VERSION=${BASH_REMATCH[1]}
echo "Building Version $VERSION for Linux"
echo "NPM Install"
npm ci
@@ -28,4 +33,4 @@ rm -f ./build/asphyxia-core-linux-x64.zip
cd build
zip -qq asphyxia-core-linux-x64.zip asphyxia-core
cd ..
zip -qq ./build/asphyxia-core-armv7.zip -r plugins
zip -qq ./build/asphyxia-core-linux-x64.zip -r plugins

View File

@@ -1,9 +1,12 @@
# Getting version
$VER_CODE = Select-String -Path ".\src\utils\Consts.ts" -Pattern "VERSION = '(.*)'"
$VERSION = $VER_CODE.Matches.Groups[1].Value;
Write-Output "Building Version $VERSION for Windows"
# Prepare directories
New-Item -Path "." -Name "build" -ItemType "directory" -Force | Out-Null
Write-Output "Building Windows Version"
Write-Output "Copying windows node binary cache"
New-Item -Path "$env:USERPROFILE" -Name ".pkg-cache" -ItemType "directory" -Force | Out-Null
New-Item -Path "$env:USERPROFILE\.pkg-cache" -Name "v2.6" -ItemType "directory" -Force | Out-Null