2024-09-26 20:26:07 +00:00
|
|
|
#!/usr/bin/env bash
|
2024-09-26 08:31:24 +00:00
|
|
|
# push main to prod (which will trigger the deploy action)
|
2024-09-26 20:26:07 +00:00
|
|
|
CURR_BRANCH=$(git symbolic-ref --short HEAD)
|
|
|
|
if [[ ${CURR_BRANCH} == "main" ]]; then
|
|
|
|
echo pushing main to prod...
|
|
|
|
git checkout prod
|
|
|
|
git merge --ff-only main
|
|
|
|
git push origin prod
|
|
|
|
git checkout main
|
|
|
|
else
|
|
|
|
echo "This script is meant to be run from the main branch!"
|
|
|
|
fi
|