2022-02-25 15:41:56 +00:00
|
|
|
#!/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"
|
|
|
|
|
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"
|