Skip to content

Commit

Permalink
Merge pull request #96 from stianst/master
Browse files Browse the repository at this point in the history
Fix dry run detection
  • Loading branch information
stianst committed Jan 29, 2018
2 parents 216db21 + 212dd25 commit ede895f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions productize.sh
@@ -1,6 +1,8 @@
#!/bin/bash -e

if [ "$GH_USER_NAME" != "" ] && [ "$GH_USER_EMAIL" != "" ] && "$GH_TOKEN" != "" ] && [ "$GH_REF" != "" ]; then
GH_PROD_BRANCH="7.2.x-devel"

if [ "$GH_USER_NAME" != "" ] && [ "$GH_USER_EMAIL" != "" ] && [ "$GH_TOKEN" != "" ] && [ "$GH_REF" != "" ]; then
DRY_RUN="false"
else
DRY_RUN="true"
Expand Down Expand Up @@ -65,7 +67,7 @@ git status
git commit . -m "Converted to RH-SSO QuickStarts"

if [ "$DRY_RUN" == "false" ]; then
git push --force "https://${GH_TOKEN}@${GH_REF}" prod_staging:7.2.x-devel
git push --force "https://${GH_TOKEN}@${GH_REF}" prod_staging:$GH_PROD_BRANCH
else
echo ""
echo "Dry run, not committing"
Expand Down

0 comments on commit ede895f

Please sign in to comment.