Skip to content

Commit 690a9cf

Browse files
authored
Merge pull request #2696 from ViewComponent/joelhawksley-redesigned-sniffle
Fix release: bundler frozen mode and silent rake docs:build failure
2 parents aaca93b + dae5769 commit 690a9cf

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

‎script/release‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
#!/usr/bin/env bash
22

3+
# bundler-cache: true in setup-ruby enables frozen mode, which blocks
4+
# updating Gemfile.lock after the gemspec version bump. Disable it for
5+
# every bundler invocation in this script so the lockfile can be
6+
# regenerated to match the new version.
7+
export BUNDLE_FROZEN=false
8+
export BUNDLE_DEPLOYMENT=false
9+
310
fetch() {
411
git fetch --all
512
}
@@ -54,8 +61,10 @@ update_ruby_version() {
5461
}
5562

5663
update_gemfiles() {
57-
# Update Gemfile.lock
58-
bundle
64+
# Update Gemfile.lock. Use `bundle lock` (not `bundle install`) so we
65+
# only rewrite the lockfile with the new version — no gem installs
66+
# needed, and it avoids re-triggering the bundler-cache frozen check.
67+
bundle lock
5968

6069
# Update appraisal gemfile locks.
6170
# BUNDLE_IGNORE_RUBY_VERSION is needed because the gemfiles declare ruby
@@ -66,8 +75,8 @@ update_gemfiles() {
6675
}
6776

6877
build_docs() {
69-
ruby script/sync_contributors.rb
70-
bundle exec rake docs:build
78+
ruby script/sync_contributors.rb || { echo "Error: sync_contributors.rb failed"; exit 1; }
79+
bundle exec rake docs:build || { echo "Error: rake docs:build failed"; exit 1; }
7180
}
7281

7382
add_changed_files() {

0 commit comments

Comments
 (0)