Skip to content

Commit

Permalink
fix(choco) Fix for choco push to support windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Wolfe committed May 5, 2020
1 parent efdcd39 commit 2e19fe4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .appveyor/appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
image: WMF 5
skip_non_tags: true
clone_folder: c:\gopath\src\github.com\versent\saml2aws
environment:
Expand All @@ -7,6 +6,7 @@ environment:
secure: 3kWTz99Qj+ipyaR73CxcJeGRRbmk84MF2ERDu6MyY10cjHAi6s3AVZ2Ccoa+Ioyt
appName: saml2aws
install:
- set PATH=C:\msys64\mingw64\bin;%PATH%
- ps: >-
$VerbosePreference = 'Continue'
Expand All @@ -30,6 +30,7 @@ install:
Install-Module InvokeBuild -Force
build_script:
- cmd: go mod download
- ps: >-
Invoke-Build
test_script:
Expand Down
8 changes: 3 additions & 5 deletions default.build.ps1
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
Set-StrictMode -Version 'Latest'

#$nameOfApp = 'saml2aws'
$version = ${env:APPVEYOR_REPO_TAG_NAME}.Split('v')[1]
# $version = ${env:APPVEYOR_REPO_TAG_NAME}.Split('v')[1]
$version = '2.26.0'

task 'Compile Go libraries...' {
$ErrorActionPreference = 'Continue'
go get -u github.com/golang/dep/cmd/dep 2> $null
c:\gopath\bin\dep ensure 2> $null
$ErrorActionPreference = 'Stop'
go build -o "bin/${env:appName}.exe" -ldflags "-X main.Version=${version}" "./cmd/$env:appName"
}

Expand All @@ -31,4 +29,4 @@ task 'Zip for GH release...' {
"$($hash.Hash) $(Split-Path $hash.Path -Leaf)" > "${env:appName}.zip.sha256"
}

task . 'Compile Go libraries...', 'Prepare for choco stuff...', 'Pack Choco...', 'Zip for GH release...'
task . 'Compile Go libraries...', 'Prepare for choco stuff...', 'Pack Choco...', 'Zip for GH release...'

0 comments on commit 2e19fe4

Please sign in to comment.