github.com/ezbuy/gauge@v0.9.4-0.20171013092048-7ac5bd3931cd/build/sign_windows_artifacts.ps1 (about) 1 # Copyright 2015 ThoughtWorks, Inc. 2 3 # This file is part of Gauge. 4 5 # Gauge is free software: you can redistribute it and/or modify 6 # it under the terms of the GNU General Public License as published by 7 # the Free Software Foundation, either version 3 of the License, or 8 # (at your option) any later version. 9 10 # Gauge is distributed in the hope that it will be useful, 11 # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 # GNU General Public License for more details. 14 15 # You should have received a copy of the GNU General Public License 16 # along with Gauge. If not, see <http://www.gnu.org/licenses/>. 17 18 param ( 19 [switch]$nightly = $false 20 ) 21 22 if ("$env:GOPATH" -eq "") { 23 $env:GOPATH=$pwd 24 } 25 if ("$env:GOBIN" -eq "") { 26 $env:GOBIN="$env:GOPATH\bin" 27 } 28 29 Set-Location -Path "$env:GOPATH\src\github.com\getgauge\gauge" 30 31 go get github.com/tools/godep 32 & "$env:GOBIN\godep.exe" "restore" 33 34 Push-Location "$pwd\bin\windows_amd64" 35 signtool sign /f $env:CERT_FILE /p "$env:CERT_FILE_PWD" gauge.exe 36 Pop-Location 37 38 Push-Location "$pwd\bin\windows_386" 39 signtool sign /f $env:CERT_FILE /p "$env:CERT_FILE_PWD" gauge.exe 40 Pop-Location 41 42 $nightlyFlag = If ($nightly) {"--nightly"} Else {""} 43 & go run build/make.go --distro --certFile $env:CERT_FILE --certFilePwd "$env:CERT_FILE_PWD" --bin-dir bin\windows_amd64 $nightlyFlag 44 & go run build/make.go --distro --certFile $env:CERT_FILE --certFilePwd "$env:CERT_FILE_PWD" --bin-dir bin\windows_386 $nightlyFlag 45 46 mkdir test_installers 47 48 & cmd "/c" "copy /B deploy\gauge-*-darwin.x86_64.zip test_installers\gauge-darwin.x86_64.zip" 49 & cmd "/c" "copy /B deploy\gauge-*-linux.x86_64.zip test_installers\gauge-linux.x86_64.zip" 50 & cmd "/c" "copy /B deploy\gauge-*-windows.x86_64.exe test_installers\gauge-windows.x86_64.exe"