Picsur/support/build.sh
2022-02-27 20:27:22 +01:00

21 lines
543 B
Bash
Executable file

#!/bin/bash
# Go to this script
cd "$( dirname "${BASH_SOURCE[0]}" )"
# Read current version from ../package.json
VERSION=$(cat ../package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g' | tr -d '[[:space:]]')
echo "Building version $VERSION"
docker build -t "ghcr.io/rubikscraft/picsur:$VERSION" -t "ghcr.io/rubikscraft/picsur:latest" -f ./picsur.Dockerfile ..
echo "Done"
echo "Pushing to ghcr.io"
docker push "ghcr.io/rubikscraft/picsur:$VERSION"
docker push "ghcr.io/rubikscraft/picsur:latest"
echo "Done"