19 lines
587 B
Makefile
19 lines
587 B
Makefile
publish-to-staging:
|
|
@current_branch=$$(git rev-parse --abbrev-ref HEAD); \
|
|
git branch -D staging 2>/dev/null; \
|
|
git checkout -b staging; \
|
|
git merge $$current_branch && \
|
|
git push -f origin staging && \
|
|
git checkout $$current_branch; \
|
|
echo Pushed $$current_branch to staging
|
|
|
|
sync-master-to-staging:
|
|
@current_branch=$$(git rev-parse --abbrev-ref HEAD); \
|
|
git branch -D staging 2>/dev/null; \
|
|
git checkout master && \
|
|
git pull origin master && \
|
|
git checkout -b staging && \
|
|
git push -f origin staging && \
|
|
git checkout $$current_branch && \
|
|
echo Pushed master to staging
|