Skip to content
This repository was archived by the owner on Nov 1, 2017. It is now read-only.

Commit 441bb7d

Browse files
author
Hubot
committed
Sync changes from upstream repository
1 parent 726e2c5 commit 441bb7d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

script/enterprise-cutter

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# users; since Enterprise is a "managed" product, it's cut off of DotCom at a certain
77
# time, and the APIs remain frozen (until an organization upgrades their instance).
88
#
9-
# This script takes two arguments: a date and a version number. Given a date, it
9+
# This script takes two arguments: a SHA and a version number. Given a sha, it
1010
# fetches the state of the site at that moment in time. It then copies all of that
1111
# content into a new folder called *enterprise/<version>*. Thus, we're able to preserve
1212
# the state of the API documentation for a given version at a given time.
@@ -15,13 +15,13 @@ require 'fileutils'
1515
require 'tmpdir'
1616

1717
if ARGV.length != 2
18-
error = '''Error: Run the script like this: bundle exec script/enterprise-cutter [DATE] [VERSION]
19-
e.g. bundle exec script/enterprise-cutter 2014-07-08 11.10.340
18+
error = '''Error: Run the script like this: bundle exec script/enterprise-cutter [SHA] [VERSION]
19+
e.g. bundle exec script/enterprise-cutter deadb33f 11.10.340
2020
'''
2121
abort error
2222
end
2323

24-
DATE = ARGV[0].dup # yyyy-mm-dd, like, 2014-07-08
24+
SHA = ARGV[0].dup # SHA, like, deadb33f
2525
VERSION = ARGV[1].dup # like, 11.10.340
2626

2727
BRANCH_NAME = "add-#{VERSION}-docs"
@@ -32,7 +32,7 @@ setup
3232

3333
temp_dir = Dir.mktmpdir
3434
begin
35-
%x(git checkout `git rev-list -n 1 --before="#{DATE}" gh-pages`)
35+
%x(git checkout #{SHA})
3636
`cp -r * #{temp_dir}`
3737
`git checkout #{BRANCH_NAME}`
3838
FileUtils.mkdir_p("enterprise/#{VERSION}")

0 commit comments

Comments
 (0)