17 lines
436 B
Bash
Executable File
17 lines
436 B
Bash
Executable File
#!/usr/bin/bash
|
|
|
|
set -e
|
|
|
|
# Install dependencies
|
|
dnf install -y unzip
|
|
|
|
# Download and extract vault
|
|
curl -L -o /app/vault.zip https://releases.hashicorp.com/vault/${PACKAGE_VERSION}/vault_${PACKAGE_VERSION}_linux_amd64.zip
|
|
unzip vault.zip
|
|
|
|
# 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
|