-
Notifications
You must be signed in to change notification settings - Fork 1
/
go.yml
40 lines (40 loc) · 1.48 KB
/
go.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
utility:
dumb-init: &github
dest: /usr/local/bin
perm: '755'
only: '[ ${os} = Linux ] && [ ! -x "${dest}/${utility}" ]'
download: https://github.com/Yelp/dumb-init/releases/download/v${version}/dumb-init_${version}_${arch}
update: |
owner="$(awk -F/ '{print $4"/"$5}' <<< "${download}")"
export download=https://github.com/"${owner}"/releases/latest
eval "${default_download_head}" |
awk '$1 ~ /[Ll]ocation:/ { gsub(".*/[^0-9.]*", "", $0); print;exit}'
yq: &github-goarch
<<: *github
only: '[ ! -x "${dest}/${utility}" ]'
os:
Linux: linux
Darwin: darwin
arch:
x86_64: amd64
aarch64: arm64
download: https://github.com/mikefarah/yq/releases/download/v${version}/yq_${os}_${arch}
gotestsum:
<<: *github-goarch
download: https://github.com/gotestyourself/gotestsum/releases/download/v${version}/gotestsum_${version}_${os}_${arch}.tar.gz
extract: tar -xzC "${dest}/" --no-same-owner "${utility}"
tinygo: &go
<<: *github-goarch
dest: /usr/local
only: '[ ! -d "${dest}/${utility}" ]'
download: https://github.com/tinygo-org/tinygo/releases/download/v${version}/tinygo${version}.${os}-${arch}.tar.gz
extract: tar -xzC ${dest}/ --no-same-owner
go:
<<: *go
download: https://go.dev/dl/go${version}.${os}-${arch}.tar.gz
update: >
git ls-remote -t https://github.com/golang/go.git 'go*' |
sed 's/.*refs\/tags\/go//' |
grep '^[.0-9]\+$' |
sort -Vr |
head -n1