Skip to content

Commit c76458f

Browse files
committed
close #178 add scoop release
1 parent a309fc8 commit c76458f

File tree

4 files changed

+79
-1
lines changed

4 files changed

+79
-1
lines changed

ci/pipeline.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,16 @@ jobs:
136136
params:
137137
repository: updated-praqma-tap
138138

139+
- name: supersonic
140+
plan:
141+
- get: scoop-bucket
142+
- get: git-phlow
143+
- get: gp-version
144+
- get: phlow-artifact-windows-s3
145+
- task: scoop-release
146+
file: git-phlow/ci/scoop/scoop.yml
147+
- put: scoop-bucket
148+
params: {repository: scoop-bucket}
139149

140150

141151
resource_types:
@@ -172,7 +182,19 @@ resources:
172182
uri: [email protected]:Praqma/homebrew-praqma-tap.git
173183
branch: master
174184
private_key: {{github-private-key}}
175-
185+
186+
#GIHUB SCOOP-TAP
187+
- name: scoop-bucket
188+
type: git
189+
source:
190+
uri: [email protected]:Praqma/scoop-praqma-tools.git
191+
branch: master
192+
private_key: {{github-private-key}}
193+
git_config:
194+
- name: user.email
195+
196+
- name: user.name
197+
value: concourse
176198

177199
#PRETESTED INTEGRATION
178200
- name: tollgate

ci/scoop/scoop.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import hashlib
2+
import json
3+
4+
version = open("gp-version/version","r").read().replace("\n","")
5+
hash = hashlib.sha256(open("phlow-artifact-windows-s3/git-phlow-"+ version +"-windows-amd64.zip","r").read()).hexdigest()
6+
7+
8+
d = {
9+
"version": version,
10+
"license": "mit",
11+
"extract_dir": "",
12+
"url": "https://github.com/Praqma/git-phlow/releases/download/v"+ version +"/git-phlow-"+version+"-windows-amd64.zip",
13+
"depends": "git",
14+
"homepage": "https://github.com/praqma/git-phlow",
15+
"hash": hash,
16+
"bin": "git-phlow.exe",
17+
"notes": "type 'git phlow' for help" ,
18+
"autoupdate": {
19+
"url": "https://github.com/Praqma/git-phlow/releases/download/v"+version+"/git-phlow-"+version+"-windows-amd64.zip"
20+
}
21+
}
22+
23+
24+
file = open("scoop-bucket/git-phlow.json","w")
25+
file.write(json.dumps(d, indent=2))

ci/scoop/scoop.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/sh
2+
3+
set -e -u -x
4+
5+
export VERSION=$(cat gp-version/version)
6+
7+
#Generate the scoop manifest
8+
python git-phlow/ci/scoop/scoop.py
9+
10+
#Print the manifest to screen
11+
cat scoop-bucket/git-phlow.json
12+
13+
#Commit everything in the scoop bucket
14+
cd scoop-bucket
15+
git add --all
16+
git commit -m "$VERSION released"

ci/scoop/scoop.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
platform: linux
3+
4+
image_resource:
5+
type: docker-image
6+
source: {repository: python, tag: "2.7"}
7+
8+
inputs:
9+
- name: scoop-bucket
10+
- name: git-phlow
11+
- name: gp-version
12+
- name: phlow-artifact-windows-s3
13+
14+
run:
15+
path: git-phlow/ci/scoop/scoop.sh

0 commit comments

Comments
 (0)