This repository has been archived on 2026-11-27. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
w10k/scripts/build-rpm.sh
T
unkin-agent fc5d90b684
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
Add w10k: deploy Puppet environments as sha-pinned git worktrees
2026-11-08 17:38:08 +11:00

32 lines
978 B
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"
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