Skip to content

Commit 0c08c0a

Browse files
committed
close #231 deliver git phlow also using chocolatey packages
1 parent e7afd37 commit 0c08c0a

File tree

6 files changed

+115
-4
lines changed

6 files changed

+115
-4
lines changed

ci/chocolatey/chocolatey.ps1

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
ls
3+
$version = Get-Content .\gp-version\version
4+
5+
Expand-Archive .\phlow-artifact-windows-s3\git-phlow-*.zip -DestinationPath .\phlow-artifact-windows-s3
6+
7+
ls .\phlow-artifact-windows-s3
8+
9+
mv phlow-artifact-windows-s3/git-phlow.exe git-phlow/ci/chocolatey/tools/
10+
11+
cd git-phlow/ci/chocolatey
12+
ls tools/
13+
14+
$NuSpecFilePath = ".\git-phlow.nuspec"
15+
$file = Get-Item -Path $NuSpecFilePath
16+
[ xml ]$fileContents = Get-Content -Path $NuSpecFilePath
17+
$fileContents.package.metadata.version = '{0}' -f $version
18+
$fileContents.Save($file.Fullname)
19+
20+
$token = [Environment]::GetEnvironmentVariable("chocotoken","User")
21+
22+
choco pack
23+
24+
choco push --api-key $token
25+
26+
exit $lastexitcode

ci/chocolatey/chocolatey.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
platform: windows
3+
4+
inputs:
5+
- name: git-phlow
6+
- name: gp-version
7+
- name: phlow-artifact-windows-s3
8+
9+
params:
10+
token:
11+
12+
run:
13+
path: powershell.exe
14+
args:
15+
- -File
16+
- '.\git-phlow\ci\chocolatey\chocolatey.ps1'
17+

ci/chocolatey/git-phlow.nuspec

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
This is a nuspec. It mostly adheres to https://docs.nuget.org/create/Nuspec-Reference. Chocolatey uses a special version of NuGet.Core that allows us to do more than was initially possible. As such there are certain things to be aware of:
4+
5+
* the package xmlns schema url may cause issues with nuget.exe
6+
* Any of the following elements can ONLY be used by choco tools - projectSourceUrl, docsUrl, mailingListUrl, bugTrackerUrl, packageSourceUrl, provides, conflicts, replaces
7+
* nuget.exe can still install packages with those elements but they are ignored. Any authoring tools or commands will error on those elements
8+
-->
9+
<!-- Do not remove this test for UTF-8: if “Ω” doesn’t appear as greek uppercase omega letter enclosed in quotation marks, you should use an editor that supports UTF-8, not this one. -->
10+
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
11+
<metadata>
12+
<id>git-phlow</id>
13+
<version>3.8.0</version>
14+
<packageSourceUrl>https://github.com/Praqma/git-phlow</packageSourceUrl>
15+
<projectUrl>https://github.com/Praqma/git-phlow</projectUrl>
16+
<owners>praqma</owners>
17+
<title>git-phlow (Install)</title>
18+
<authors>groenborg</authors>
19+
<tags>git-phlow</tags>
20+
<summary>git phlow is a free open git extension for workflows</summary>
21+
<description>git phlow is open source and works together with pretested integration to automatic integrate changes into your repository</description>
22+
</metadata>
23+
<files>
24+
<!-- this section controls what actually gets packaged into the Chocolatey package -->
25+
<file src="tools\**" target="tools" />
26+
<!--Building from Linux? You may need this instead: <file src="tools/**" target="tools" />-->
27+
</files>
28+
</package>

ci/chocolatey/tools/LICENSE.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From: https://opensource.org/licenses/MIT
2+
3+
LICENSE
4+
5+
MIT License
6+
7+
Copyright (c) 2017 Praqma
8+
9+
Permission is hereby granted, free of charge, to any person obtaining a copy
10+
of this software and associated documentation files (the "Software"), to deal
11+
in the Software without restriction, including without limitation the rights
12+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13+
copies of the Software, and to permit persons to whom the Software is
14+
furnished to do so, subject to the following conditions:
15+
16+
The above copyright notice and this permission notice shall be included in all
17+
copies or substantial portions of the Software.
18+
19+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25+
SOFTWARE.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
VERIFICATION
2+
Verification is intended to assist the Chocolatey moderators and community
3+
in verifying that this package's contents are trustworthy.
4+
5+
<Check github release on official repository for checksum>

ci/pipeline.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ jobs:
8989
params: {file: build-artifacts/git-phlow-*-windows-amd64.zip}
9090

9191
#PAC GOES HERE
92-
93-
9492

9593

9694
#CREATE A GITHUB RELEASE
@@ -105,7 +103,7 @@ jobs:
105103
- get: gp-version
106104
passed: [darwin-pilot-check,linux-pilot-check,windows-pilot-check]
107105
- get: git-phlow
108-
106+
passed: [darwin-pilot-check,linux-pilot-check,windows-pilot-check]
109107
- put: gh-release
110108
params:
111109
name: gp-version/version
@@ -117,7 +115,7 @@ jobs:
117115
- phlow-artifact-darwin-s3/git-phlow-*-darwin-amd64.tar.gz
118116
- phlow-artifact-windows-s3/git-phlow-*-windows-amd64.zip
119117

120-
118+
#HOMEBREW DEPLOYMENT
121119
- name: afterburner
122120
plan:
123121
- aggregate:
@@ -140,6 +138,7 @@ jobs:
140138
params:
141139
repository: updated-praqma-tap
142140

141+
#SCOOP DEPLOYMENT
143142
- name: supersonic
144143
plan:
145144
- get: scoop-bucket
@@ -155,6 +154,17 @@ jobs:
155154
- put: scoop-bucket
156155
params: {repository: scoop-bucket-modified}
157156

157+
#CHOCOLATEY DEPLOYMENT
158+
- name: lightspeed
159+
plan:
160+
- get: git-phlow
161+
- get: phlow-artifact-windows-s3
162+
passed: [takeoff]
163+
- get: gp-version
164+
passed: [takeoff]
165+
trigger: true
166+
- task: choco-release
167+
file: git-phlow/ci/chocolatey/chocolatey.yml
158168

159169
resource_types:
160170
#PIP RESOURCE_TYPE

0 commit comments

Comments
 (0)