Skip to content

Commit

Permalink
fix(complete.sh): fix bugs with master branch and upstream
Browse files Browse the repository at this point in the history
complete.sh would fail if pollinating from master branch.  Also, it would leave skeleton as the

upstream for the new master branch, which is bad, bad, bad.
  • Loading branch information
jedwards1211 committed Jun 10, 2017
1 parent bd9578c commit deef956
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions complete.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#!/usr/bin/env bash
set -e

if [[ $(git symbolic-ref --short HEAD) != 'master' ]]; then
git branch -D master
git checkout -b master
fi
git branch --unset-upstream master
git remote rename origin skeleton
git branch -D master
git checkout -b master
git remote add origin $(node -p 'require("./package").repository.url')
rm complete.sh
git add --all .
git commit -n -m 'pollinate project'
Expand Down

0 comments on commit deef956

Please sign in to comment.