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

Commit abf99f1

Browse files
author
Nikita Chernyi
authored
Merge pull request #4 from titanium-codes/master
1.1.3
2 parents 6e0709d + 8fca1fb commit abf99f1

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
lines changed

CHANGELOG.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
# Release v[1.1.2](github.com/rakshazi/bump.sh/tags/1.1.2)
1+
# Release v[1.1.3](https://github.com/titanium-codes/bump.sh/tree/1.1.3)
22

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

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

7+
* 2a062b2 Fixes shebang
8+
* 62b4178 Update README.md

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818
* Commits that file with commit summary `Release v<NEW_VERSION>`
1919
* Creates new tag with release version and changes list as message
2020
* Pushes commit with new tag and updated changelog
21-
* Opens Gitlab Merge Request (url generated from origin url) with predefined title and branches in browser
21+
* Opens Gitlab Merge Request or GitHub Pull Request (url generated from origin url) with predefined title and branches in browser
2222

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

2525
## Integration with git
2626

2727
```bash
28-
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
28+
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
2929
git config --global alias.bump "git-bump"
3030
```
3131

bin

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,12 @@ echo -n "Enter new version (Current branch: $BRANCH_CURRENT | Previous version:
3838
read NEW_VERSION
3939

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

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

5257
# Open merge request url with preset changes
53-
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"
58+
if [[ $REPO_URL == *"gitlab"* ]]; then
59+
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"
60+
elif [[ $REPO_URL == *"github"* ]]; then
61+
xdg-open "https://$REPO_URL/compare/$BRANCH_1...$BRANCH_2&pull_request[title]=$NEW_VERSION"
62+
fi
5463
echo -e "$PREFIX Don't forget to notify your teammates about new release!"

0 commit comments

Comments
 (0)