-
Notifications
You must be signed in to change notification settings - Fork 10
/
release-yaml.sh
executable file
·59 lines (50 loc) · 1.05 KB
/
release-yaml.sh
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/env bash
set -ueo pipefail
root_d="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
bin_d="${root_d}/bin"
latest_tag="$(git tag -l | sort -V | tail -1)"
echo "Latest tag is ${latest_tag}"
echo "---"
echo "binaries:"
versions=(
cf-conduit.darwin.amd64
cf-conduit.darwin.arm64
cf-conduit.windows.386
cf-conduit.windows.amd64
cf-conduit.windows.arm64
cf-conduit.linux.386
cf-conduit.linux.amd64
cf-conduit.linux.arm64
)
for v in "${versions[@]}"; do
url="https://github.com/alphagov/paas-cf-conduit/releases/download/${latest_tag}/${v}"
checksum="$(curl -sfL "${url}.sha1")"
case $v in
cf-conduit.darwin*)
platform="osx"
;;
cf-conduit.windows.386)
platform="win32"
;;
cf-conduit.windows.amd64)
platform="win64"
;;
cf-conduit.windows.arm64)
platform="win64"
;;
cf-conduit.linux.386)
platform="linux32"
;;
cf-conduit.linux.amd64)
platform="linux64"
;;
cf-conduit.linux.arm64)
platform="linux64"
;;
esac
cat <<EOF
- checksum: ${checksum}
platform: ${platform}
url: ${url}
EOF
done