9d8ceda045
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/build-fedora44 Pipeline was successful
ci/woodpecker/pr/build-fedora43 Pipeline was successful
ci/woodpecker/pr/build-fedora42 Pipeline was successful
ci/woodpecker/pr/build-almalinux8 Pipeline was successful
ci/woodpecker/pr/build-almalinux9 Pipeline was successful
23 lines
780 B
Bash
Executable File
23 lines
780 B
Bash
Executable File
#!/usr/bin/bash
|
|
|
|
set -e
|
|
|
|
BASE_URL="https://artifactapi.k8s.syd1.au.unkin.net/api/v1/remote/github/cert-manager/cmctl/releases/download/v${PACKAGE_VERSION}"
|
|
|
|
wget -O /app/cmctl "${BASE_URL}/cmctl_linux_amd64"
|
|
wget -O /app/checksums.txt "${BASE_URL}/checksums.txt"
|
|
|
|
# Upstream lists the asset name; check it against the local filename.
|
|
cd /app
|
|
grep ' cmctl_linux_amd64$' checksums.txt | sed 's/cmctl_linux_amd64$/cmctl/' | sha256sum --check --strict -
|
|
chmod +x /app/cmctl
|
|
|
|
mkdir -p /app/completions
|
|
/app/cmctl completion bash > /app/completions/cmctl
|
|
/app/cmctl completion zsh > /app/completions/_cmctl
|
|
/app/cmctl completion fish > /app/completions/cmctl.fish
|
|
|
|
envsubst < /app/resources/nfpm.yaml > /app/nfpm.yaml
|
|
|
|
nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm
|