Unverified Commit 2c9649b7 authored by Jeremy Bokobza's avatar Jeremy Bokobza Committed by GitHub

Merge pull request #381 from bokobza/master

Local build scripts
parents fa4f52cc d1684095
...@@ -294,3 +294,6 @@ project.lock.json ...@@ -294,3 +294,6 @@ project.lock.json
/Breeze/src/Breeze.Daemon/Logs /Breeze/src/Breeze.Daemon/Logs
/Breeze.UI/.vscode/.BROWSE.VC.DB-wal /Breeze.UI/.vscode/.BROWSE.VC.DB-wal
/Breeze.UI/.vscode/.BROWSE.VC.DB-shm /Breeze.UI/.vscode/.BROWSE.VC.DB-shm
/Breeze.UI/daemon
/Breeze.UI/app-builds
/Breeze.UI/dist
# This file should be kept in sync with the appveyor.yml file.
# If run successfully to completion, it will
# 1. install dotnet dependencies
# 2. build the dotnet daemon
# 3. install node dependencies
# 4. build the electron app
# 5. start the app
$env:current_folder = $PSScriptRoot
$env:APPVEYOR_BUILD_FOLDER = $env:current_folder + "\.."
$env:win_runtime = "win-x64" # win-x32
$env:configuration = "Release" # Debug
$env:arch = "x64" # ia32
$env:plat = "win32"
$env:app_output_name = "app"
cd $env:APPVEYOR_BUILD_FOLDER
dir
Write-Host "Installing dependencies" -foregroundcolor "magenta"
Write-Host "--> git submodule" -foregroundcolor "magenta"
git submodule update --init --recursive
Write-Host "--> npm install" -foregroundcolor "magenta"
cd $env:APPVEYOR_BUILD_FOLDER/Breeze.UI
npm install --verbose
Write-Host "--> npm install npx" -foregroundcolor "magenta"
npm install npx --verbose
Write-Host "FINISHED restoring dotnet and npm packages" -foregroundcolor "magenta"
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
#---------------------------------#
# build configuration #
#---------------------------------#
Write-Host "*--------------------------------*" -foregroundcolor "magenta"
Write-Host "current environment variables:" -foregroundcolor "magenta"
Write-Host "Windows runtime: $env:win_runtime" -foregroundcolor "magenta"
Write-Host "Build directory: $env:APPVEYOR_BUILD_FOLDER" -foregroundcolor "magenta"
Write-Host "Configuration: $env:configuration" -foregroundcolor "magenta"
Write-Host "*--------------------------------*" -foregroundcolor "magenta"
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
Write-Host "running 'dotnet publish'" -foregroundcolor "magenta"
cd $env:APPVEYOR_BUILD_FOLDER/StratisBitcoinFullNode/Stratis.BreezeD
dotnet publish -c $env:configuration -v m -r $env:win_runtime -o $env:APPVEYOR_BUILD_FOLDER\Breeze.UI\daemon
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
Write-Host "building Breeze" -foregroundcolor "magenta"
cd $env:APPVEYOR_BUILD_FOLDER/Breeze.UI
npm run build:prod
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
Write-Host "packaging breeze" -foregroundcolor "magenta"
npx electron-builder build --windows --$env:arch
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
Write-Host "[$env:configuration][$env:win_runtime] FINISHED Breeze packaging" -foregroundcolor "magenta"
dir
cd app-builds
# replace the spaces in the name with a dot as CI system have trouble handling spaces in names.
Dir *.exe | rename-item -newname { $_.name -replace " ","." }
dir
Write-Host "[$env:configuration][$env:win_runtime] Done! Your installer is:" -foregroundcolor "green"
Get-ChildItem -Path "*.exe" | foreach-object {$_.Fullname}
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
# This file should be kept in sync with the appveyor.yml file.
# If run successfully to completion, it will
# 1. install dotnet dependencies
# 2. build the dotnet daemon
# 3. install node dependencies
# 4. build the electron app
# 5. start the app
$env:current_folder = $PSScriptRoot
$env:APPVEYOR_BUILD_FOLDER = $env:current_folder + "\.."
$env:win_runtime = "win-x86" # win-x64
$env:configuration = "Release" # Debug
$env:arch = "ia32" # x64
$env:plat = "win32"
$env:app_output_name = "app"
cd $env:APPVEYOR_BUILD_FOLDER
dir
Write-Host "Installing dependencies" -foregroundcolor "magenta"
Write-Host "--> git submodule" -foregroundcolor "magenta"
git submodule update --init --recursive
Write-Host "--> npm install" -foregroundcolor "magenta"
cd $env:APPVEYOR_BUILD_FOLDER/Breeze.UI
npm install --verbose
Write-Host "--> npm install npx" -foregroundcolor "magenta"
npm install npx --verbose
Write-Host "FINISHED restoring dotnet and npm packages" -foregroundcolor "magenta"
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
#---------------------------------#
# build configuration #
#---------------------------------#
Write-Host "*--------------------------------*" -foregroundcolor "magenta"
Write-Host "current environment variables:" -foregroundcolor "magenta"
Write-Host "Windows runtime: $env:win_runtime" -foregroundcolor "magenta"
Write-Host "Build directory: $env:APPVEYOR_BUILD_FOLDER" -foregroundcolor "magenta"
Write-Host "Configuration: $env:configuration" -foregroundcolor "magenta"
Write-Host "*--------------------------------*" -foregroundcolor "magenta"
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
Write-Host "running 'dotnet publish'" -foregroundcolor "magenta"
cd $env:APPVEYOR_BUILD_FOLDER/StratisBitcoinFullNode/Stratis.BreezeD
dotnet publish -c $env:configuration -v m -r $env:win_runtime -o $env:APPVEYOR_BUILD_FOLDER\Breeze.UI\daemon
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
Write-Host "building Breeze" -foregroundcolor "magenta"
cd $env:APPVEYOR_BUILD_FOLDER/Breeze.UI
npm run build:prod
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
Write-Host "packaging breeze" -foregroundcolor "magenta"
npx electron-builder build --windows --$env:arch
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
Write-Host "[$env:configuration][$env:win_runtime] FINISHED Breeze packaging" -foregroundcolor "magenta"
dir
cd app-builds
# replace the spaces in the name with a dot as CI system have trouble handling spaces in names.
Dir *.exe | rename-item -newname { $_.name -replace " ","." }
dir
Write-Host "[$env:configuration][$env:win_runtime] Done! Your installer is:" -foregroundcolor "green"
Get-ChildItem -Path "*.exe" | foreach-object {$_.Fullname}
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
...@@ -105,6 +105,8 @@ build_script: ...@@ -105,6 +105,8 @@ build_script:
dir dir
cd app-builds cd app-builds
# replace the spaces in the name with a dot as CI system have trouble handling spaces in names.
Dir *.exe | rename-item -newname { $_.name -replace " ","." }
dir dir
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
......
...@@ -78,6 +78,9 @@ ls ...@@ -78,6 +78,9 @@ ls
echo $log_prefix contents of the app-builds folder echo $log_prefix contents of the app-builds folder
cd $TRAVIS_BUILD_DIR/Breeze.UI/app-builds/ cd $TRAVIS_BUILD_DIR/Breeze.UI/app-builds/
# replace the spaces in the name with a dot as CI system have trouble handling spaces in names.
for file in *.{dmg,tar.gz,deb}; do mv "$file" `echo $file | tr ' ' '.'` 2>/dev/null || : ; done
ls ls
echo $log_prefix FINISHED build echo $log_prefix FINISHED build
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment