File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change 33set -e
44
55tagname=" ${1?} "
6- version=" ${tagname# v} "
7- urlprefix=" https://github.com/cli/cli/releases/download/$tagname /"
86jsonfile=" ${2?} "
97
108jq_args=(
11- --arg version " $version "
9+ --arg version " ${tagname# v} "
10+ --arg urlprefix " https://github.com/cli/cli/releases/download/$tagname /"
1211 $( cat | awk '
1312 /windows_386/ {
14- printf "--arg win32hash \"%s\" \n", $1
15- printf "--arg win32file \"%s\" \n", $2
13+ printf "--arg win32hash %s \n", $1
14+ printf "--arg win32file %s \n", $2
1615 }
1716 /windows_amd64/ {
18- printf "--arg win64hash \"%s\" \n", $1
19- printf "--arg win64file \"%s\" \n", $2
17+ printf "--arg win64hash %s \n", $1
18+ printf "--arg win64file %s \n", $2
2019 }
2120 ' )
2221)
2322
2423jq '
2524 .version = $version |
26- .architecture."32bit".url = $win32file |
25+ .architecture."32bit".url = $urlprefix + $ win32file |
2726 .architecture."32bit".hash = $win32hash |
28- .architecture."64bit".url = $win64file |
27+ .architecture."64bit".url = $urlprefix + $ win64file |
2928 .architecture."64bit".hash = $win64hash
3029' " ${jq_args[@]} " --indent 4 " $jsonfile " > " $jsonfile " ~
30+
31+ mv " $jsonfile " {~,}
You can’t perform that action at this time.
0 commit comments