Skip to content

Commit deef956

Browse files
committed
fix(complete.sh): fix bugs with master branch and upstream
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.
1 parent bd9578c commit deef956

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

complete.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
#!/usr/bin/env bash
22
set -e
33

4+
if [[ $(git symbolic-ref --short HEAD) != 'master' ]]; then
5+
git branch -D master
6+
git checkout -b master
7+
fi
8+
git branch --unset-upstream master
49
git remote rename origin skeleton
5-
git branch -D master
6-
git checkout -b master
10+
git remote add origin $(node -p 'require("./package").repository.url')
711
rm complete.sh
812
git add --all .
913
git commit -n -m 'pollinate project'

0 commit comments

Comments
 (0)