package.ps1 719 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. # Package the build
  2. #Requires -Version 4.0
  3. $ErrorActionPreference = "Stop"
  4. . "$PSScriptRoot\functions.ps1"
  5. $msysbash = Get-MSYS2Bash "$msysprefix"
  6. $env:CHERE_INVOKING = 'yes'
  7. & $msysbash -l "$PSScriptRoot\package-windows.sh"
  8. if ($LastExitcode -ne 0) {
  9. exit 1
  10. }
  11. if ($null -eq $env:BUILD_DIR) {
  12. $builddir = & $msysbash -l "$PSScriptRoot\get-win-build-path.sh"
  13. if ($LastExitcode -ne 0) {
  14. exit 1
  15. }
  16. } else {
  17. $builddir = $env:BUILD_DIR
  18. }
  19. Push-Location "$builddir"
  20. $wixarch = "x64"
  21. wix build -arch $wixarch -ext WixToolset.Util.wixext -ext WixToolset.UI.wixext -out "$PSScriptRoot\netdata-$wixarch.msi" netdata.wxs
  22. if ($LastExitcode -ne 0) {
  23. Pop-Location
  24. exit 1
  25. }
  26. Pop-Location