From 2e19fe434664145afc69a61b49f3f412520e1655 Mon Sep 17 00:00:00 2001 From: Mark Wolfe Date: Tue, 5 May 2020 21:38:21 +1000 Subject: [PATCH] fix(choco) Fix for choco push to support windows Fixes #459 #432 #426 #374 #223 --- .appveyor/appveyor.yml | 3 ++- default.build.ps1 | 8 +++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.appveyor/appveyor.yml b/.appveyor/appveyor.yml index 2e898e461..9bb56afa7 100644 --- a/.appveyor/appveyor.yml +++ b/.appveyor/appveyor.yml @@ -1,4 +1,3 @@ -image: WMF 5 skip_non_tags: true clone_folder: c:\gopath\src\github.com\versent\saml2aws environment: @@ -7,6 +6,7 @@ environment: secure: 3kWTz99Qj+ipyaR73CxcJeGRRbmk84MF2ERDu6MyY10cjHAi6s3AVZ2Ccoa+Ioyt appName: saml2aws install: +- set PATH=C:\msys64\mingw64\bin;%PATH% - ps: >- $VerbosePreference = 'Continue' @@ -30,6 +30,7 @@ install: Install-Module InvokeBuild -Force build_script: +- cmd: go mod download - ps: >- Invoke-Build test_script: diff --git a/default.build.ps1 b/default.build.ps1 index 676728345..ca11e747f 100644 --- a/default.build.ps1 +++ b/default.build.ps1 @@ -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" } @@ -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...' \ No newline at end of file +task . 'Compile Go libraries...', 'Prepare for choco stuff...', 'Pack Choco...', 'Zip for GH release...'