Skip to content

Commit

Permalink
Switch to Zip
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyTellier committed Dec 13, 2023
1 parent 4f9fb0d commit 64c70de
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions Installer/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,16 @@ $scriptPath = Split-Path $invocation.MyCommand.Path
$buildPath = "${scriptPath}\build"

echo "Getting latest UI Build"
git clone https://github.com/openziti/desktop-edge-ui
cd ./desktop-edge-ui/ziti-edge-ui
echo "Install Node Dependencies"
if (test-path 'node_modules') {
echo "Modues Exists, Removing"
Remove-Item node_modules -Recurse -Force -Confirm:$false
if (test-path 'ziti-edge-ui') {
echo "UI Exists, Removing"
Remove-Item ziti-edge-ui -Recurse -Force -Confirm:$false
}
if (test-path 'package-lock.json') {
echo "Package Lock Exists, Removing"
Remove-Item package-lock.json -Force -Confirm:$false
if (test-path 'ZitiUI.zip') {
echo "UI Exists, Removing"
Remove-Item ZitiUI.zip -Recurse -Force -Confirm:$false
}
npm cache clean --force
npm install
npm i -g electron-packager
echo "Build Electron Packageg"
electron-packager ./ Ziti-Desktop-Edge --overwrite --asar --electron-version=26.2.4 --platform=win32 --arch=x64 --prune=true --out=../release-builds --icon=./app.ico
cd ../../
Invoke-WebRequest "https://github.com/openziti/desktop-edge-ui/releases/latest/download/ZitiUI.zip" -OutFile "ZitiUI.zip"
Expand-Archive -Path "ZitiUI.zip" -DestinationPath "ziti-edge-ui"

echo "Cleaning previous build folder if it exists"
Remove-Item "${buildPath}" -r -ErrorAction Ignore
Expand Down

0 comments on commit 64c70de

Please sign in to comment.