chore(tools): add JS dist to gem release
This commit is contained in:
parent
471e8c4018
commit
388efb1ae3
1 changed files with 9 additions and 0 deletions
|
@ -27,6 +27,9 @@ GEM_SPEC="jekyll-theme-chirpy.gemspec"
|
|||
|
||||
NODE_CONFIG="package.json"
|
||||
|
||||
JS_DIST="assets/js/dist"
|
||||
BACKUP_PATH="$(mktemp -d)"
|
||||
|
||||
FILES=(
|
||||
"_sass/jekyll-theme-chirpy.scss"
|
||||
"$GEM_SPEC"
|
||||
|
@ -150,7 +153,10 @@ build_gem() {
|
|||
echo -e "Build the gem package for v$_version\n"
|
||||
cleanup_config
|
||||
rm -f ./*.gem
|
||||
git add "$JS_DIST" -f # add JS dist to gem
|
||||
gem build "$GEM_SPEC"
|
||||
cp "$JS_DIST"/* "$BACKUP_PATH"
|
||||
git restore --staged "$JS_DIST" # resume the git status
|
||||
resume_config
|
||||
}
|
||||
|
||||
|
@ -202,6 +208,9 @@ main() {
|
|||
else
|
||||
release "$_version"
|
||||
fi
|
||||
|
||||
# restore the dist files for future development
|
||||
mkdir -p "$JS_DIST" && cp "$BACKUP_PATH"/* "$JS_DIST"
|
||||
}
|
||||
|
||||
while (($#)); do
|
||||
|
|
Loading…
Reference in a new issue