Skip to content

Commit ec69bea

Browse files
committed
build: remove _data/authors.yml from the gem
1 parent 75a2504 commit ec69bea

File tree

2 files changed

+11
-17
lines changed

2 files changed

+11
-17
lines changed

jekyll-theme-chirpy.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
1111
spec.license = "MIT"
1212

1313
spec.files = `git ls-files -z`.split("\x0").select { |f|
14-
f.match(%r!^((_(includes|layouts|sass|data)|assets)\/|README|LICENSE)!i)
14+
f.match(%r!^((_(includes|layouts|sass|(data\/(locales|origin)))|assets)\/|README|LICENSE)!i)
1515
}
1616

1717
spec.metadata = {

tools/release

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,6 @@ _bump_files() {
112112

113113
sed -i "s/v[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+/v$1/" "${FILES[$i]}"
114114
done
115-
116-
npm run build
117115
}
118116

119117
_bump_gemspec() {
@@ -138,26 +136,22 @@ bump() {
138136
fi
139137
}
140138

141-
## Remove unnecessary theme settings
142-
cleanup_config() {
143-
cp _config.yml _config.yml.bak
144-
sed -i "s/^img_cdn:.*/img_cdn:/;s/^avatar:.*/avatar:/" _config.yml
145-
}
146-
147-
resume_config() {
148-
mv _config.yml.bak _config.yml
149-
}
150-
151-
# build a gem package
139+
## Build a gem package
152140
build_gem() {
153141
echo -e "Build the gem package for v$_version\n"
154-
cleanup_config
142+
143+
# Remove unnecessary theme settings
144+
sed -i "s/^img_cdn:.*/img_cdn:/;s/^avatar:.*/avatar:/" _config.yml
155145
rm -f ./*.gem
146+
147+
npm run build
156148
git add "$JS_DIST" -f # add JS dist to gem
157149
gem build "$GEM_SPEC"
158150
cp "$JS_DIST"/* "$BACKUP_PATH"
159-
git restore --staged "$JS_DIST" # resume the git status
160-
resume_config
151+
152+
# Resume the settings
153+
git reset
154+
git checkout .
161155
}
162156

163157
# Update the git branch graph, tag, and then build the gem package.

0 commit comments

Comments
 (0)