Files
Picsur/support/build.sh

21 lines
543 B
Bash
Raw Normal View History

2022-02-25 16:41:56 +01: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"
docker build -t "ghcr.io/rubikscraft/imagur:$VERSION" -t "ghcr.io/rubikscraft/imagur:latest" -f ./imagur.Dockerfile ..
echo "Done"
echo "Pushing to ghcr.io"
docker push "ghcr.io/rubikscraft/imagur:$VERSION"
docker push "ghcr.io/rubikscraft/imagur:latest"
echo "Done"