Skip to content

Commit c485a84

Browse files
committed
update
1 parent db6dee8 commit c485a84

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

publish-docker.sh

+6-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@ docker build . -t mevdschee/php-crud-api:latest
1616
# Revert
1717
git switch -
1818

19-
# Press enter to publish
20-
echo -n Press enter to publish..; read
19+
# Confirm to publish
20+
read -p "Publish $latestTag to mevdschee/php-crud-api:$dockerTag? " -n 1 -r
21+
echo # (optional) move to a new line
22+
if [[ $REPLY =~ ^[Yy]$ ]]
23+
then
2124

2225
# Login to DockerHub
2326
docker login
@@ -26,3 +29,4 @@ docker push mevdschee/php-crud-api:$dockerTag
2629
# Push latest
2730
docker push mevdschee/php-crud-api:latest
2831

32+
fi

0 commit comments

Comments
 (0)