File tree Expand file tree Collapse file tree 5 files changed +23
-10
lines changed
Expand file tree Collapse file tree 5 files changed +23
-10
lines changed Original file line number Diff line number Diff line change 1+ # # concourse task for releasing a package on chocolatey
12
2- ls
3+ ls # debugging
4+
5+ # read version from file
36$version = Get-Content .\gp- version\version
47
58Expand-Archive .\phlow- artifact- windows- s3\git- phlow-* .zip - DestinationPath .\phlow- artifact- windows- s3
69
10+ # list artifact for debugging purpose
711ls .\phlow- artifact- windows- s3
812
13+
914mv phlow- artifact- windows- s3/ git-phlow.exe git- phlow/ ci/ chocolatey/ tools/
1015
1116cd git- phlow/ ci/ chocolatey
1217ls tools/
1318
19+ # update the nuspec file
1420$NuSpecFilePath = " .\git-phlow.nuspec"
1521$file = Get-Item - Path $NuSpecFilePath
1622[ xml ]$fileContents = Get-Content - Path $NuSpecFilePath
1723$fileContents.package.metadata.version = ' {0}' -f $version
1824$fileContents.Save ($file.Fullname )
1925
20- $token = [ Environment ]::GetEnvironmentVariable( " chocotoken" , " User " )
26+ $token = $ env: chocotoken
2127
2228choco pack
2329
Original file line number Diff line number Diff line change 77 - name : phlow-artifact-windows-s3
88
99params :
10- token :
10+ chocotoken :
1111
1212run :
1313 path : powershell.exe
Original file line number Diff line number Diff line change @@ -169,6 +169,8 @@ jobs:
169169 trigger : true
170170 - task : choco-release
171171 file : git-phlow/ci/chocolatey/chocolatey.yml
172+ params :
173+ chocotoken : {{choco-token}}
172174
173175resource_types :
174176# PIP RESOURCE_TYPE
Original file line number Diff line number Diff line change 11# SET GOPATH TO TMP DIRECTORY, BECAUSE WE WANT THE DEPENDENCIES LOCALLY
2+
3+ # this line is important. The worker have been configured through a build session, so the powershell
4+ # have not been reloaded to update the path. Therefore we must set it each time.
5+ $env: Path = [System.Environment ]::GetEnvironmentVariable(" Path" , " Machine" )
6+
27$env: GOPATH = " $PWD \"
38$env: GOBIN = " $PWD \bin"
49
5- # NAVIGATE TO FOLDER
6- mkdir - p $env: GOPATH / src/ github.com / praqma
10+ # # NAVIGATE TO FOLDER
11+ mkdir - Path $env: GOPATH / src/ github.com / praqma
712cp - R git- phlow/ $env: GOPATH / src/ github.com / praqma
813
914cd $env: GOPATH / src/ github.com / praqma/ git- phlow
15+ ls
1016
11- # GET DEPENDENCIES
17+ # # GET DEPENDENCIES
1218go get - d - t - v ./ ...
1319
14- # RUN TESTS
20+ # # RUN TESTS
1521cd plugins
1622go test - v ./ ...
1723
18- # USES THE LATEST EXITCODE, WHICH IS FROM GO TEST, AND EXITS WITH THAT. THIS FIXIS
24+ # # USES THE LATEST EXITCODE, WHICH IS FROM GO TEST, AND EXITS WITH THAT. THIS FIXIS
1925# ISSUE #152
2026exit $lastexitcode
Original file line number Diff line number Diff line change @@ -3,9 +3,8 @@ platform: windows
33
44inputs :
55 - name : git-phlow
6-
6+
77run :
8-
98 path : powershell.exe
109 args :
1110 - -File
You can’t perform that action at this time.
0 commit comments