1
0
Fork 0

also tag image with short version

This commit is contained in:
Nick Sweeting 2021-01-11 02:50:57 +02:00
parent a51096d856
commit 9e1bf844cf

View file

@ -12,6 +12,7 @@ IFS=$'\n'
REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd )" REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd )"
VERSION="$(jq -r '.version' < "$REPO_DIR/package.json")" VERSION="$(jq -r '.version' < "$REPO_DIR/package.json")"
SHORT_VERSION="$(echo "$VERSION" | perl -pe 's/(\d+)\.(\d+)\.(\d+)/$1.$2/g')"
cd "$REPO_DIR" cd "$REPO_DIR"
which docker > /dev/null which docker > /dev/null
@ -20,9 +21,13 @@ echo "[+] Building docker image in the background..."
docker build . -t archivebox \ docker build . -t archivebox \
-t archivebox:latest \ -t archivebox:latest \
-t archivebox:$VERSION \ -t archivebox:$VERSION \
-t archivebox:$SHORT_VERSION \
-t docker.io/nikisweeting/archivebox:latest \ -t docker.io/nikisweeting/archivebox:latest \
-t docker.io/nikisweeting/archivebox:$VERSION \ -t docker.io/nikisweeting/archivebox:$VERSION \
-t docker.io/nikisweeting/archivebox:$SHORT_VERSION \
-t docker.io/archivebox/archivebox:latest \ -t docker.io/archivebox/archivebox:latest \
-t docker.io/archivebox/archivebox:$VERSION \ -t docker.io/archivebox/archivebox:$VERSION \
-t docker.io/archivebox/archivebox:$SHORT_VERSION \
-t docker.pkg.github.com/pirate/archivebox/archivebox:latest \ -t docker.pkg.github.com/pirate/archivebox/archivebox:latest \
-t docker.pkg.github.com/pirate/archivebox/archivebox:$VERSION -t docker.pkg.github.com/pirate/archivebox/archivebox:$VERSION \
-t docker.pkg.github.com/pirate/archivebox/archivebox:$SHORT_VERSION