#!/usr/bin/bash set -e # Download and extract xh wget -O /app/xh-v${PACKAGE_VERSION}-x86_64-unknown-linux-musl.tar.gz https://github.com/ducaale/xh/releases/download/v${PACKAGE_VERSION}/xh-v${PACKAGE_VERSION}-x86_64-unknown-linux-musl.tar.gz tar xf /app/xh-v${PACKAGE_VERSION}-x86_64-unknown-linux-musl.tar.gz mv /app/xh-v${PACKAGE_VERSION}-x86_64-unknown-linux-musl/* /app/ # Process the nfpm.yaml template with environment variables envsubst < /app/resources/nfpm.yaml > /app/nfpm.yaml # Build the RPM nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm