Skip to content

Commit c98ded3

Browse files
committed
These are immutable constants
1 parent 807d3de commit c98ded3

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

script/enterprise-backport

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
# will need to be backported to the previous verison. This script takes the latest content
55
# for /enterprise and moves it into the appropriate version folder.
66

7+
require 'tmpdir'
8+
9+
VERSION = ARGV[0].dup # like, 11.10.340
10+
11+
BRANCH_NAME = "backport-docs-for-#{VERSION}"
12+
713
Dir.glob('tasks/*.rake').each { |r| load r }
814

915
if ARGV.length != 1
@@ -13,23 +19,19 @@ e.g. bundle exec script/enterprise-cutter 2.0
1319
abort error
1420
end
1521

16-
version = ARGV[0].dup # like, 11.10.340
17-
18-
BRANCH_NAME = "backport-docs-for-#{version}"
19-
2022
setup
2123

2224
temp_dir = Dir.mktmpdir
2325
begin
2426
%x(git checkout `git rev-list -n 1 --before="#{date}" gh-pages`)
2527
`cp -r v3/enterprise #{temp_dir}`
2628
`git checkout #{BRANCH_NAME}`
27-
`cp -r #{temp_dir}/* enterprise/#{version}`
29+
`cp -r #{temp_dir}/* enterprise/#{VERSION}`
2830

29-
rewrite_content("enterprise/#{version}")
31+
rewrite_content("enterprise/#{VERSION}")
3032

3133
`git add enterprise`
32-
`git commit -m "Added enterprise-#{version} backported files"`
34+
`git commit -m "Added enterprise-#{VERSION} backported files"`
3335
ensure
3436
FileUtils.remove_entry_secure temp_dir
3537
end

0 commit comments

Comments
 (0)