Fix bump tool

This commit is contained in:
Cotes Chung 2021-04-12 13:15:14 +08:00
parent b14e97a92d
commit a71659ed27

View file

@ -1,16 +1,23 @@
#!/usr/bin/env bash
#
# 1. Bump latest version number to files:
# - _sass/jekyll-theme-chirpy.scss
# - assets/js/.copyright.js
# - assets/js/dist/*.js (will be built by gulp later)
# - jekyll-theme-chirpy.gemspec
# - Gemfile.lock
# - package.json
# How does it work:
#
# 2. Create a git-tag on release branch
# 1. Bump latest version number to files:
# - _sass/jekyll-theme-chirpy.scss
# - assets/js/_copyright.js
# - assets/js/dist/*.js (will be built by gulp later)
# - jekyll-theme-chirpy.gemspec
# - package.json
#
# 3. Build a RubyGems package base on the latest git-tag
# 2. Create a git-tag on release branch
#
# 3. Build a RubyGems package base on the latest git-tag
#
#
# Usage:
#
# Switch to 'master' branch or 'X-Y-stable' branch with argument '-m',
#` and then run this script.
#
#
# Requires: Git, Gulp, RubyGems
@ -41,9 +48,9 @@ check() {
exit -1
fi
# ensure the current branch is 'master'
if [[ "$(git branch --show-current)" != "master" && manual_release == "false" ]]; then
echo "Error: This operation must be performed on the 'master' branch!"
# ensure the current branch is 'master' or running in 'manual' mode
if [[ "$(git branch --show-current)" != "master" && $manual_release == "false" ]]; then
echo "Error: This operation must be performed on the 'master' branch or '--manual' mode!"
exit -1
fi