File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change 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+
713Dir . glob ( 'tasks/*.rake' ) . each { |r | load r }
814
915if ARGV . length != 1
@@ -13,23 +19,19 @@ e.g. bundle exec script/enterprise-cutter 2.0
1319 abort error
1420end
1521
16- version = ARGV [ 0 ] . dup # like, 11.10.340
17-
18- BRANCH_NAME = "backport-docs-for-#{ version } "
19-
2022setup
2123
2224temp_dir = Dir . mktmpdir
2325begin
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"`
3335ensure
3436 FileUtils . remove_entry_secure temp_dir
3537end
You can’t perform that action at this time.
0 commit comments