Skip to content

Commit 6dac22d

Browse files
committed
Fix bump tool
1 parent 2c99e5f commit 6dac22d

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

tools/bump.sh

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
11
#!/usr/bin/env bash
22
#
3-
# 1. Bump latest version number to files:
4-
# - _sass/jekyll-theme-chirpy.scss
5-
# - assets/js/.copyright.js
6-
# - assets/js/dist/*.js (will be built by gulp later)
7-
# - jekyll-theme-chirpy.gemspec
8-
# - Gemfile.lock
9-
# - package.json
3+
# How does it work:
104
#
11-
# 2. Create a git-tag on release branch
5+
# 1. Bump latest version number to files:
6+
# - _sass/jekyll-theme-chirpy.scss
7+
# - assets/js/_copyright.js
8+
# - assets/js/dist/*.js (will be built by gulp later)
9+
# - jekyll-theme-chirpy.gemspec
10+
# - package.json
1211
#
13-
# 3. Build a RubyGems package base on the latest git-tag
12+
# 2. Create a git-tag on release branch
13+
#
14+
# 3. Build a RubyGems package base on the latest git-tag
15+
#
16+
#
17+
# Usage:
18+
#
19+
# Switch to 'master' branch or 'X-Y-stable' branch with argument '-m',
20+
#` and then run this script.
1421
#
1522
#
1623
# Requires: Git, Gulp, RubyGems
@@ -41,9 +48,9 @@ check() {
4148
exit -1
4249
fi
4350

44-
# ensure the current branch is 'master'
45-
if [[ "$(git branch --show-current)" != "master" && manual_release == "false" ]]; then
46-
echo "Error: This operation must be performed on the 'master' branch!"
51+
# ensure the current branch is 'master' or running in 'manual' mode
52+
if [[ "$(git branch --show-current)" != "master" && $manual_release == "false" ]]; then
53+
echo "Error: This operation must be performed on the 'master' branch or '--manual' mode!"
4754
exit -1
4855
fi
4956

0 commit comments

Comments
 (0)