File tree Expand file tree Collapse file tree 3 files changed +53
-12
lines changed
Expand file tree Collapse file tree 3 files changed +53
-12
lines changed Original file line number Diff line number Diff line change @@ -160,3 +160,26 @@ jobs:
160160 download-url : https://github.com/cli/cli.git
161161 env :
162162 COMMITTER_TOKEN : ${{ secrets.UPLOAD_GITHUB_TOKEN }}
163+ - name : Checkout scoop bucket
164+ uses : actions/checkout@v2
165+ with :
166+ repository : cli/scoop-gh
167+ path : scoop-gh
168+ fetch-depth : 0
169+ token : ${{secrets.UPLOAD_GITHUB_TOKEN}}
170+ - name : Bump scoop bucket
171+ shell : bash
172+ run : |
173+ hub release download "${GITHUB_REF#refs/tags/}" -i '*_checksums.txt'
174+ script/scoop-gen "${GITHUB_REF#refs/tags/}" ./scoop-gh/gh.json < *_checksums.txt
175+ git -C ./scoop-gh commit -m "gh ${GITHUB_REF#refs/tags/}" gh.json
176+ if [[ $GITHUB_REF == *-* ]]; then
177+ git -C ./scoop-gh show -m
178+ else
179+ git -C ./scoop-gh push
180+ fi
181+ env :
182+ GIT_COMMITTER_NAME : cli automation
183+ GIT_AUTHOR_NAME : cli automation
184+ GIT_COMMITTER_EMAIL : noreply@github.com
185+ GIT_AUTHOR_EMAIL : noreply@github.com
Original file line number Diff line number Diff line change @@ -63,15 +63,3 @@ nfpms:
6363 - rpm
6464 files :
6565 " ./share/man/man1/gh*.1 " : " /usr/share/man/man1"
66-
67- scoop :
68- bucket :
69- owner : cli
70- name : scoop-gh
71- commit_author :
72- name : vilmibm
73- email : vilmibm@github.com
74- homepage : https://github.com/cli/cli
75- skip_upload : auto
76- description : GitHub CLI
77- license : MIT
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # Usage: cat checksums.txt | script/scoop-gen <version> <json-file>
3+ set -e
4+
5+ tagname=" ${1?} "
6+ version=" ${tagname# v} "
7+ urlprefix=" https://github.com/cli/cli/releases/download/$tagname /"
8+ jsonfile=" ${2?} "
9+
10+ jq_args=(
11+ --arg version " $version "
12+ $( cat | awk '
13+ /windows_386/ {
14+ printf "--arg win32hash \"%s\"\n", $1
15+ printf "--arg win32file \"%s\"\n", $2
16+ }
17+ /windows_amd64/ {
18+ printf "--arg win64hash \"%s\"\n", $1
19+ printf "--arg win64file \"%s\"\n", $2
20+ }
21+ ' )
22+ )
23+
24+ jq '
25+ .version = $version |
26+ .architecture."32bit".url = $win32file |
27+ .architecture."32bit".hash = $win32hash |
28+ .architecture."64bit".url = $win64file |
29+ .architecture."64bit".hash = $win64hash
30+ ' " ${jq_args[@]} " --indent 4 " $jsonfile " > " $jsonfile " ~
You can’t perform that action at this time.
0 commit comments