File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ # Stash local changes
4+ git stash
5+
36# Get new tags from remote
47git fetch --tags
58# Get latest tag name
69latestTag=$( git describe --tags ` git rev-list --tags --max-count=1` )
710# Checkout latest tag
811git checkout $latestTag
9- # Login to DockerHub
10- docker login
1112# Make docker tag
1213dockerTag=$( echo $latestTag | sed s/v/release-/)
1314# Build release
1415docker build . -t mevdschee/php-crud-api:$dockerTag
15- # Push release
16- docker push mevdschee/php-crud-api:$dockerTag
1716# Build latest
1817docker build . -t mevdschee/php-crud-api:latest
18+
19+ # Apply stashed changes
20+ git stash apply
21+
22+ # Login to DockerHub
23+ docker login
24+ # Push release
25+ docker push mevdschee/php-crud-api:$dockerTag
1926# Push latest
2027docker push mevdschee/php-crud-api:latest
2128
22- # Revert
23- git checkout main
You can’t perform that action at this time.
0 commit comments