Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016CfGMAJK5sD43otMxjBYEy
17 lines
502 B
Python
Executable File
17 lines
502 B
Python
Executable File
#!/usr/bin/env bash
|
|
# Build the next versioned image, push it (+ :latest) to the registry, and
|
|
# record the new version in version.txt. Usage: ./build
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"
|
|
|
|
IMAGE=registry.digitalsorcery.net/hardings-service
|
|
NEXT="v$(($(tr -d 'v[:space:]' < version.txt) + 1))"
|
|
|
|
podman build --pull=always -t "$IMAGE:$NEXT" -t "$IMAGE:latest" .
|
|
podman push "$IMAGE:$NEXT"
|
|
podman push "$IMAGE:latest"
|
|
echo "$NEXT" > version.txt
|
|
|
|
echo "Pushed $IMAGE:$NEXT"
|