Remove the value of img_cdn
and avatar
from the gem package
This commit is contained in:
parent
3d6304efd8
commit
565ad9229c
2 changed files with 13 additions and 2 deletions
|
@ -69,7 +69,7 @@ init_files() {
|
||||||
rm -f "$_workflow.$TEMP_SUFFIX"
|
rm -f "$_workflow.$TEMP_SUFFIX"
|
||||||
|
|
||||||
## Cleanup image settings in site config
|
## 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
|
rm -f _config.yml.$TEMP_SUFFIX
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -28,6 +28,16 @@ check() {
|
||||||
fi
|
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() {
|
release() {
|
||||||
_default_branch="$(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@')"
|
_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
|
_version="$(grep "spec.version" jekyll-theme-chirpy.gemspec | sed 's/.*= "//;s/".*//')" # X.Y.Z
|
||||||
|
@ -49,9 +59,10 @@ release() {
|
||||||
|
|
||||||
# build a gem package
|
# build a gem package
|
||||||
echo -e "Build the gem pakcage for v$_version\n"
|
echo -e "Build the gem pakcage for v$_version\n"
|
||||||
|
cleanup_config
|
||||||
rm -f ./*.gem
|
rm -f ./*.gem
|
||||||
gem build "$GEM_SPEC"
|
gem build "$GEM_SPEC"
|
||||||
|
resume_config
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
|
|
Loading…
Reference in a new issue