1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 21:53:26 +00:00

Merge branch 'hotfix/4.3.2'

This commit is contained in:
Cotes Chung
2021-10-15 00:49:57 +08:00
parent 5ef1478148
commit 29ba2666ce
15 changed files with 29 additions and 16 deletions

View File

@@ -69,7 +69,7 @@ init_files() {
rm -f "$_workflow.$TEMP_SUFFIX"
## Cleanup image settings in site config
sed -i.$TEMP_SUFFIX "s/^img_cdn:.*/img_cdn: ''/;s/^avatar:.*/avatar: ''/" _config.yml
sed -i.$TEMP_SUFFIX "s/^img_cdn:.*/img_cdn:/;s/^avatar:.*/avatar:/" _config.yml
rm -f _config.yml.$TEMP_SUFFIX
fi
@@ -83,7 +83,7 @@ init_files() {
rm -rf _posts/* docs
# save changes
git add -A && git add .github -f
git add -A
git commit -m "[Automation] Initialize the environment." -q
echo "[INFO] Initialization successful!"

View File

@@ -28,6 +28,16 @@ check() {
fi
}
## Remove unnecessary theme settings
cleanup_config() {
cp _config.yml _config.yml.bak
sed -i "s/^img_cdn:.*/img_cdn:/;s/^avatar:.*/avatar:/" _config.yml
}
resume_config() {
mv _config.yml.bak _config.yml
}
release() {
_default_branch="$(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@')"
_version="$(grep "spec.version" jekyll-theme-chirpy.gemspec | sed 's/.*= "//;s/".*//')" # X.Y.Z
@@ -49,9 +59,10 @@ release() {
# build a gem package
echo -e "Build the gem pakcage for v$_version\n"
cleanup_config
rm -f ./*.gem
gem build "$GEM_SPEC"
resume_config
}
main() {