#!/usr/bin/env bash # Build the Spendlight container image and stamp it with the next version. # The VERSION file is only updated once the build succeeds. set -euo pipefail cd "$(dirname "$0")/.." version="$(scripts/next-version.sh)" echo "Building Spendlight ${version}" docker build \ --build-arg APP_VERSION="${version}" \ --label org.opencontainers.image.version="${version}" \ -t "spendlight:${version}" \ -t spendlight:latest \ . echo "${version}" > VERSION echo "Built spendlight:${version}"