#!/usr/bin/bash set -e # Install dependencies dnf install -y unzip # Download and extract nomad curl -L -o /app/nomad.zip https://releases.hashicorp.com/nomad/${PACKAGE_VERSION}/nomad_${PACKAGE_VERSION}_linux_amd64.zip unzip nomad.zip # Process the nfpm.yaml template with environment variables envsubst < /app/resources/nfpm.yaml > /app/nfpm.yaml nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm