Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd17b878

Browse files
committed
Usability updates to enterprise-cutter script
Before I forget.
1 parenta9a6bf3 commitd17b878

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

‎script/enterprise-cutter‎

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,32 @@ require 'fileutils'
44
require'tmpdir'
55
require'nokogiri'
66

7-
%x(git checkout gh-pages)
8-
%x(git pull origin gh-pages)
7+
ERROR_MESSAGE="""
8+
Error: Run the script like this: bundle exec script/enterprise-cutter [DATE] [VERSION]
9+
e.g. bundle exec script/enterprise-cutter 2014-07-8 11.10.340
10+
"""
911

10-
%x(git checkout -b add-backfilled-versions)
12+
ifARGV.length ==0
13+
abort"\n#{ERROR_MESSAGE}\n\n"
14+
elsifARGV.length >2
15+
abort"\n#{ERROR_MESSAGE}\n\n"
16+
end
1117

12-
# run the script like this: bundle exec script/enterprise-cutter [DATE] [VERSION]
13-
# where [DATE] and [VERSION} are command-line arguments, defined below
1418
date=ARGV[0].dup# yyyy-mm-dd, like, 2014-07-08
1519
version=ARGV[1].dup# like, 11.10.340
1620

21+
BRANCH_NAME="add-#{version}-docs"
22+
23+
%x(git checkout gh-pages)
24+
%x(git pull origin gh-pages)
25+
26+
%x(git checkout -b#{BRANCH_NAME})
27+
1728
temp_dir=Dir.mktmpdir
1829
begin
1930
%x(git checkout `git rev-list -n 1 --before="#{date}" gh-pages`)
2031
%x(cp -r *#{temp_dir})
21-
%x(git checkoutadd-backfilled-versions)
32+
%x(git checkout#{BRANCH_NAME})
2233
version.sub!(/enterprise-/,'')
2334
FileUtils.mkdir_p("enterprise/#{version}")
2435
%x(cp -r#{temp_dir}/* enterprise/#{version})

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp