Notes/bin/build-docker.sh

18 lines
431 B
Bash
Raw Permalink Normal View History

2018-06-10 15:06:52 -04:00
#!/usr/bin/env bash
2024-07-22 21:33:07 +03:00
set -e # Fail on any command error
VERSION=`jq -r ".version" package.json`
2019-04-23 20:20:42 +02:00
SERIES=${VERSION:0:4}-latest
2018-06-10 15:06:52 -04:00
2019-10-15 21:53:46 +02:00
cat package.json | grep -v electron > server-package.json
echo "Compiling typescript..."
npx tsc
sudo docker build -t triliumnext/notes:$VERSION --network host -t triliumnext/notes:$SERIES .
2019-04-23 20:20:42 +02:00
if [[ $VERSION != *"beta"* ]]; then
sudo docker tag triliumnext/notes:$VERSION triliumnext/notes:latest
2019-04-23 20:20:42 +02:00
fi