Skip to content

Commit

Permalink
Merge pull request #35 from livingdocsIO/auto-pr-on-bump
Browse files Browse the repository at this point in the history
create PR at the bump branch
  • Loading branch information
DaRaFF authored Jul 26, 2018
2 parents 72797de + 1a0a645 commit 2426bb2
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions bin/push-feat-commit
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,21 @@ source $currentDir/helper


version=$1
token=$2
hasVersion=$(git tag -l "$version" | wc -l | tr -d '[:space:]')


# Help messages
if [ "x$1" = "x" ]; then
help () {
yellowLog "This script will create and push a branch with a feat commit."
yellowLog "Argument 1 (MUST) : <version> to create f.e. v10.0.0"
yellowLog "Argument 2 (MUST) : <github token> e.g. 11FF22FF33"
exit 1
fi
}

# Mandatory variables
[[ -z "$version" ]] && help
[[ -z "$token" ]] && help


# Does the version already exist?
Expand Down Expand Up @@ -67,4 +73,8 @@ yellowLog "Delete the local release branch bump-$version"
git checkout master
git branch -D "bump-$version"

yellowLog "Create bump pull request"
repositoryName=$(basename $(git remote show -n origin | grep Fetch | cut -d: -f2-) | cut -d "." -f 1)
GH_BUMP_TO=$version GH_REPO_NAME=$repositoryName GH_TOKEN=3b5741585b11de7a65824161161a02047167feb9 npx https://gist.github.com/DaRaFF/0faf9df4f2b4a7c8c392a140963e0443

yellowLog "push-feat-commit has been executed successfully"

0 comments on commit 2426bb2

Please sign in to comment.