FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
developer.github.com/script/enterprise-backport at master · JavaLeaks/developer.github.com · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
JavaLeaks
/
developer.github.com
Public
forked from
github/developer.github.com
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
developer.github.com
/
script
/
enterprise-backport
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
36 lines (25 loc) · 960 Bytes
Breadcrumbs
developer.github.com
/
script
/
enterprise-backport
Copy path
File metadata and controls
executable file
·
36 lines (25 loc) · 960 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env ruby
# Occasionally, a change made to the latest version of the Enterprise API documentation
# will need to be backported to the previous verison. This script takes the latest content
# for /enterprise and moves it into the appropriate version folder.
require
'tmpdir'
if
ARGV
.
length
!=
1
error
=
''
'Error: Run the script like this: bundle exec script/enterprise-backport [VERSION]
e.g. bundle exec script/enterprise-cutter 2.0
'
''
abort
error
end
VERSION
=
ARGV
[
0
]
.
dup
# like, 11.10.340
BRANCH_NAME
=
"backport-docs-for-
#{
VERSION
}
"
Dir
.
glob
(
'tasks/*.rake'
)
.
each
{
|
r
|
load
r
}
setup
temp_dir
=
Dir
.
mktmpdir
begin
`cp -r v3/enterprise enterprise/
#{
VERSION
}
/v3/`
rewrite_content
(
"enterprise/
#{
VERSION
}
/v3/enterprise"
)
`git add enterprise`
`git commit -m "Added enterprise-
#{
VERSION
}
backported files"`
ensure
FileUtils
.
remove_entry_secure
temp_dir
end
puts
"
\n
\n
Okay! Feel free to `git push
#{
BRANCH_NAME
}
` if you like."
Back
|
FazBrowse Home
|
New Git URL