Picsur/support/build.sh

21 lines
541 B
Bash
Raw Normal View History

2022-02-25 15:41:56 +00:00
#!/bin/bash
# Go to this script
2022-06-05 10:20:16 +00:00
cd "$(dirname "${BASH_SOURCE[0]}")"
2022-02-25 15:41:56 +00:00
# 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"
2022-02-27 19:27:22 +00:00
docker build -t "ghcr.io/rubikscraft/picsur:$VERSION" -t "ghcr.io/rubikscraft/picsur:latest" -f ./picsur.Dockerfile ..
2022-02-25 15:41:56 +00:00
echo "Done"
echo "Pushing to ghcr.io"
2022-02-27 19:27:22 +00:00
docker push "ghcr.io/rubikscraft/picsur:$VERSION"
docker push "ghcr.io/rubikscraft/picsur:latest"
2022-02-25 15:41:56 +00:00
echo "Done"