fd1ddea356
- run Go steps on docker-internal gobuilder with the shared GOCACHE - package with docker-internal rpmbuilder - upload the RPM with a Vault-minted artifactapi-writer token - ship fish completion in the RPM
33 lines
1.0 KiB
Bash
Executable File
33 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "${BASH_SOURCE[0]}")/.."
|
|
|
|
VERSION="${1:-${CI_COMMIT_TAG:-0.0.0-dev}}"
|
|
VERSION="${VERSION#v}"
|
|
DIST="dist"
|
|
|
|
if [ ! -f "${DIST}/w10k" ]; then
|
|
echo "ERROR: ${DIST}/w10k not found; run 'make build' first" >&2
|
|
exit 1
|
|
fi
|
|
|
|
mkdir -p "${DIST}/completions"
|
|
"./${DIST}/w10k" completion bash >"${DIST}/completions/w10k.bash"
|
|
"./${DIST}/w10k" completion zsh >"${DIST}/completions/_w10k"
|
|
"./${DIST}/w10k" completion fish >"${DIST}/completions/w10k.fish"
|
|
|
|
export PACKAGE_NAME="w10k"
|
|
export PACKAGE_VERSION="${VERSION}"
|
|
export PACKAGE_RELEASE="1"
|
|
export PACKAGE_ARCH="amd64"
|
|
export PACKAGE_PLATFORM="linux"
|
|
export PACKAGE_DESCRIPTION="Deploy Puppet environments and Puppetfile modules as sha-pinned git worktrees"
|
|
export PACKAGE_MAINTAINER="Ben Vincent <ben@unkin.net>"
|
|
export PACKAGE_HOMEPAGE="https://git.unkin.net/unkin/w10k"
|
|
export PACKAGE_LICENSE="MIT"
|
|
|
|
envsubst <packaging/nfpm.yaml >"${DIST}/nfpm.yaml"
|
|
nfpm pkg --config "${DIST}/nfpm.yaml" --target "${DIST}" --packager rpm
|
|
ls -1 "${DIST}"/*.rpm
|