Skip to content

Commit

Permalink
Updated build script for devs and hobbyists
Browse files Browse the repository at this point in the history
  • Loading branch information
crocodilestick committed Nov 1, 2024
1 parent e849a66 commit cbef98d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ while true ; do
read type
case $type in
dev | Dev | DEV)
type="dev"
echo Enter test version number\:
read testnum
break
;;

prod | Prod | PROD)
type="prod"
break
;;

Expand All @@ -35,10 +37,14 @@ done

NOW="$(date +"%Y-%m-%d %H:%M:%S")"

if [ -v testnum ]; then
if [ type == "dev" ]; then
docker build --tag $DH_USER/calibre-web-automated:dev --build-arg="BUILD_DATE=$NOW" --build-arg="VERSION=$version-TEST-$testnum" .
echo
echo "Dev image Version $version - Test $testnum created! Exiting now... "
else
docker build --tag $DH_USER/calibre-web-automated:$version --build-arg="BUILD_DATE=$NOW" --build-arg="VERSION=$version" .
echo
echo "Prod image Version $version created! Exiting now..."
fi


cd

0 comments on commit cbef98d

Please sign in to comment.