Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Commit ec6c083

Browse files
committed
Fixes for github release asset check
1 parent 48a9ba7 commit ec6c083

28 files changed

+30
-28
lines changed

@base/check-github-release-asset.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@ function check-github-release-asset() {
3434
echo "### Fetching release assets for ${repo} ${version}"
3535
local id
3636
local url="https://api.github.com/repos/${repo}/releases/tags/${version}"
37-
if ! id="$(curl --silent --location --fail "${url}" | jq --raw-output '.id')" || test -z "${id}"; then
37+
id="$(curl --silent --location "${url}" | jq --raw-output '.id')"
38+
if test -z "${id}" || test "${id}" == "null"; then
3839
echo " ERROR: Failed to fetch release id for ${repo} ${version}"
3940
echo " at ${url}"
41+
return 1
4042
fi
4143
echo " Found release id ${id} for ${repo} ${version}"
4244

@@ -45,5 +47,7 @@ function check-github-release-asset() {
4547
if ! curl --silent --location --fail "${url}" | jq --raw-output '.[].name'; then
4648
echo " ERROR: Failed to fetch release assets for ${repo} ${version}"
4749
echo " at ${url}"
50+
return 1
4851
fi
52+
return 1
4953
}

tools/git-credential-gopass/Dockerfile.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ FROM ghcr.io/nicholasdille/docker-setup/base:${ref} AS prepare
66
ARG name
77
ARG version
88
RUN <<EOF
9-
check-github-release-asset "gopasspw/gopass" "v${version}" "gopass-linux-${alt_arch}"
9+
check-github-release-asset "gopasspw/git-credential-gopass" "v${version}" "git-credential-gopass-${version}-linux-${alt_arch}.tar.gz"
1010
curl --silent --location --fail "https://github.com/gopasspw/git-credential-gopass/releases/download/v${version}/git-credential-gopass-${version}-linux-${alt_arch}.tar.gz" \
1111
| tar --extract --gzip --directory="${prefix}${target}/bin/" --no-same-owner \
1212
git-credential-gopass

tools/kbrew/Dockerfile.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ FROM ghcr.io/nicholasdille/docker-setup/base:${ref} AS prepare
66
ARG name
77
ARG version
88
RUN <<EOF
9-
check-github-release-asset "kbrew-dev/kbrew" "${version}" "kbrew_${version}_Linux_${alt_arch}.tar.gz"
9+
check-github-release-asset "kbrew-dev/kbrew" "v${version}" "kbrew_${version}_Linux_${arch}.tar.gz"
1010
curl --silent --location --fail "https://github.com/kbrew-dev/kbrew/releases/download/v${version}/kbrew_${version}_Linux_${arch}.tar.gz" \
1111
| tar --extract --gzip --directory="${prefix}${target}/bin" --no-same-owner \
1212
kbrew

tools/kcount/Dockerfile.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ FROM ghcr.io/nicholasdille/docker-setup/base:${ref} AS prepare
66
ARG name
77
ARG version
88
RUN <<EOF
9-
check-github-release-asset "pan-net-security/kcount" "${version}" "kcount_${version}_Linux_x86_64.tar.gz"
9+
check-github-release-asset "pan-net-security/kcount" "v${version}" "kcount_${version}_Linux_x86_64.tar.gz"
1010
curl --silent --location --fail "https://github.com/pan-net-security/kcount/releases/download/v${version}/kcount_${version}_Linux_x86_64.tar.gz" \
1111
| tar --extract --gzip --directory="${prefix}${target}/bin/" --no-same-owner \
1212
kcount

tools/kdo/Dockerfile.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ FROM ghcr.io/nicholasdille/docker-setup/base:${ref} AS prepare
66
ARG name
77
ARG version
88
RUN <<EOF
9-
check-github-release-asset "stepro/kdo" "${version}" "kdo-v${version}-linux-amd64.tar.gz"
9+
check-github-release-asset "stepro/kdo" "v${version}" "kdo-v${version}-linux-amd64.tar.gz"
1010
curl --silent --location --fail "https://github.com/stepro/kdo/releases/download/v${version}/kdo-v${version}-linux-amd64.tar.gz" \
1111
| tar --extract --gzip --directory="${prefix}${target}/bin/" --no-same-owner
1212
EOF

tools/ketch/Dockerfile.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ FROM ghcr.io/nicholasdille/docker-setup/base:${ref} AS prepare
66
ARG name
77
ARG version
88
RUN <<EOF
9-
check-github-release-asset "theketchio/ketch" "${version}" "ketch-linux-amd64"
9+
check-github-release-asset "theketchio/ketch" "v${version}" "ketch-linux-amd64"
1010
curl --silent --location --fail --output "${prefix}${target}/bin/ketch" \
1111
"https://github.com/theketchio/ketch/releases/download/v${version}/ketch-linux-amd64"
1212
chmod +x "${prefix}${target}/bin/ketch"

tools/kink/Dockerfile.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ FROM ghcr.io/nicholasdille/docker-setup/base:${ref} AS prepare
66
ARG name
77
ARG version
88
RUN <<EOF
9-
check-github-release-asset "Trendyol/kink" "${version}" "kink_${version}_Linux-${arch}.tar.gz"
9+
check-github-release-asset "Trendyol/kink" "v${version}" "kink_${version}_Linux-${arch}.tar.gz"
1010
curl --silent --location --fail "https://github.com/Trendyol/kink/releases/download/v${version}/kink_${version}_Linux-${arch}.tar.gz" \
1111
| tar --extract --gzip --directory="${prefix}${target}/bin" --no-same-owner \
1212
kink

tools/kn/Dockerfile.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ FROM ghcr.io/nicholasdille/docker-setup/base:${ref} AS prepare
66
ARG name
77
ARG version
88
RUN <<EOF
9-
check-github-release-asset "knative/client" "v${version}" "kn-linux-${alt_arch}"
9+
check-github-release-asset "knative/client" "knative-v${version}" "kn-linux-${alt_arch}"
1010
curl --silent --location --fail --output "${prefix}${target}/bin/kn" \
1111
"https://github.com/knative/client/releases/download/knative-v${version}/kn-linux-${alt_arch}"
1212
chmod +x "${prefix}${target}/bin/kn"

tools/kubo/Dockerfile.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ARG version
99
COPY ipfs.service ${prefix}${target}/etc/systemd/system
1010

1111
RUN <<EOF
12-
check-github-release-asset "ipfs/go-ipfs" "v${version}" "go-ipfs_v${version}_linux-${alt_arch}.tar.gz"
12+
check-github-release-asset "ipfs/kubo" "v${version}" "kubo_v${version}_linux-${alt_arch}.tar.gz"
1313
curl --silent --location --fail "https://github.com/ipfs/kubo/releases/download/v${version}/kubo_v${version}_linux-${alt_arch}.tar.gz" \
1414
| tar --extract --gzip --directory="${prefix}${target}/bin" --strip-components=1 --no-same-owner \
1515
kubo/ipfs

tools/kyverno/manifest.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: kyverno
2-
version: "10.10.10"
2+
version: "1.10.1"
33
check: ${binary} version | grep ^Version | cut -d' ' -f2
44
tags:
55
- type/cli

0 commit comments

Comments
 (0)