Update the bump tool

This commit is contained in:
Cotes Chung 2021-04-02 16:16:31 +08:00
parent 834de0f02c
commit fad8a23b87

View file

@ -21,13 +21,11 @@ manual_release=false
ASSETS=( ASSETS=(
"_sass/jekyll-theme-chirpy.scss" "_sass/jekyll-theme-chirpy.scss"
"assets/js/.copyright" "assets/js/_copyright"
) )
GEM_SPEC="jekyll-theme-chirpy.gemspec" GEM_SPEC="jekyll-theme-chirpy.gemspec"
GEM_LOCK="Gemfile.lock"
NODE_META="package.json" NODE_META="package.json"
_check_src() { _check_src() {
@ -75,17 +73,10 @@ _bump_node() {
$NODE_META $NODE_META
} }
_bump_gemlock() {
sed -i \
"s/jekyll-theme-chirpy ([[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+/jekyll-theme-chirpy ($1/" \
$GEM_LOCK
}
bump() { bump() {
_bump_assets "$1" _bump_assets "$1"
_bump_gemspec "$1" _bump_gemspec "$1"
_bump_node "$1" _bump_node "$1"
_bump_gemlock "$1"
if [[ -n $(git status . -s) ]]; then if [[ -n $(git status . -s) ]]; then
git add . git add .