Skip to content

Commit a36d67b

Browse files
committed
chore: Use constant to make it easy to switch the branch
1 parent 60d7346 commit a36d67b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Rakefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ require 'bundler'
66
SOURCE_DIR = 'src'
77
INDEX_HTML = 'files/railties/RDOC_MAIN_rdoc.html'
88
NEW_INDEX_HTML = 'files/railties/RDOC_MAIN_md.html'
9+
MY_SDOC_BRANCH = 'main'
910

1011
desc 'Generate documentation for default Rails version and build Jekyll site'
1112
task build: :switch_default_rails do
@@ -64,7 +65,7 @@ def generate_rails_rdoc
6465

6566
# Replace sdoc gem with my forked one
6667
gemfile = File.read('Gemfile')
67-
gemfile.gsub!(/"sdoc".*$/, '"sdoc", github: "toshimaru/sdoc", branch: "main"')
68+
gemfile.gsub!(/"sdoc".*$/, %("sdoc", github: "toshimaru/sdoc", branch: "#{MY_SDOC_BRANCH}"))
6869
File.write('Gemfile', gemfile)
6970

7071
sh 'bundle install && bundle update sdoc'

0 commit comments

Comments
 (0)