Skip to content
This repository has been archived by the owner on Aug 25, 2022. It is now read-only.

Commit

Permalink
Merge pull request #4 from titanium-codes/master
Browse files Browse the repository at this point in the history
1.1.3
  • Loading branch information
Nikita Chernyi authored Oct 9, 2017
2 parents 6e0709d + 8fca1fb commit abf99f1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
8 changes: 5 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release v[1.1.2](github.com/rakshazi/bump.sh/tags/1.1.2)
# Release v[1.1.3](https://github.com/titanium-codes/bump.sh/tree/1.1.3)

* 2a062b2 Fixes shebang
* 62b4178 Update README.md
* d79a979 Added support for GitHub, updated README link to stable release

# Release v[1.1.2](https://github.com/titanium-codes/bump.sh/tree/1.1.2)

* 2a062b2 Fixes shebang
* 62b4178 Update README.md
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
* Commits that file with commit summary `Release v<NEW_VERSION>`
* Creates new tag with release version and changes list as message
* Pushes commit with new tag and updated changelog
* Opens Gitlab Merge Request (url generated from origin url) with predefined title and branches in browser
* Opens Gitlab Merge Request or GitHub Pull Request (url generated from origin url) with predefined title and branches in browser

**PLEASE**, use http://semver.org/

## Integration with git

```bash
sudo curl -o /usr/local/bin/git-bump -s https://raw.githubusercontent.com/titanium-codes/bump.sh/master/bin && sudo chmod +x /usr/local/bin/git-bump
sudo curl -o /usr/local/bin/git-bump -s https://raw.githubusercontent.com/titanium-codes/bump.sh/stable/bin && sudo chmod +x /usr/local/bin/git-bump
git config --global alias.bump "git-bump"
```

Expand Down
13 changes: 11 additions & 2 deletions bin
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ echo -n "Enter new version (Current branch: $BRANCH_CURRENT | Previous version:
read NEW_VERSION

# Update changelog
echo -e "# Release v[$NEW_VERSION]($REPO_URL/tags/$NEW_VERSION)\n\n$CHANGES\n\n$(cat CHANGELOG.md)" > CHANGELOG.md
if [[ $REPO_URL == *"gitlab"* ]]; then
TAG_URL="https://$REPO_URL/tags/$NEW_VERSION"
elif [[ $REPO_URL == *"github"* ]]; then
TAG_URL="https://$REPO_URL/tree/$NEW_VERSION"
fi
echo -e "# Release v[$NEW_VERSION]($TAG_URL)\n\n$CHANGES\n\n$(cat CHANGELOG.md)" > CHANGELOG.md
git add CHANGELOG.md
git commit -q -m "Release v$NEW_VERSION"

Expand All @@ -50,5 +55,9 @@ echo -e "$PREFIX Pushing..."
git push origin --follow-tags

# Open merge request url with preset changes
xdg-open "https://$REPO_URL/merge_requests/new?utf8=✓&merge_request[source_branch]=$BRANCH_1&merge_request[target_branch]=$BRANCH_2&merge_request[title]=$NEW_VERSION"
if [[ $REPO_URL == *"gitlab"* ]]; then
xdg-open "https://$REPO_URL/merge_requests/new?utf8=✓&merge_request[source_branch]=$BRANCH_1&merge_request[target_branch]=$BRANCH_2&merge_request[title]=$NEW_VERSION"
elif [[ $REPO_URL == *"github"* ]]; then
xdg-open "https://$REPO_URL/compare/$BRANCH_1...$BRANCH_2&pull_request[title]=$NEW_VERSION"
fi
echo -e "$PREFIX Don't forget to notify your teammates about new release!"

0 comments on commit abf99f1

Please sign in to comment.