FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
developer.github.com/Rakefile at master · github3py/developer.github.com · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
github3py
/
developer.github.com
Public
forked from
sigmavirus24/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
/
Rakefile
Copy path
More file actions
More file actions
Latest commit
History
History
History
34 lines (30 loc) · 984 Bytes
Breadcrumbs
developer.github.com
/
Rakefile
Copy path
File metadata and controls
34 lines (30 loc) · 984 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
require
'nanoc3/tasks'
desc
"Compile the site"
task
:compile
do
`nanoc compile`
end
desc
"Publish to http://developer.github.com"
task
:publish
=>
[
:clean
]
do
FileUtils
.
rm_r
(
'output'
)
if
File
.
exist?
(
'output'
)
sh
"nanoc compile"
ENV
[
'GIT_DIR'
]
=
File
.
expand_path
(
`git rev-parse --git-dir`
.
chomp
)
old_sha
=
`git rev-parse refs/remotes/origin/gh-pages`
.
chomp
Dir
.
chdir
(
'output'
)
do
ENV
[
'GIT_INDEX_FILE'
]
=
gif
=
'/tmp/dev.gh.i'
ENV
[
'GIT_WORK_TREE'
]
=
Dir
.
pwd
File
.
unlink
(
gif
)
if
File
.
file?
(
gif
)
`git add -A`
tsha
=
`git write-tree`
.
strip
puts
"Created tree
#{
tsha
}
"
if
old_sha
.
size
==
40
csha
=
`echo 'boom' | git commit-tree
#{
tsha
}
-p
#{
old_sha
}
`
.
strip
else
csha
=
`echo 'boom' | git commit-tree
#{
tsha
}
`
.
strip
end
puts
"Created commit
#{
csha
}
"
puts
`git show
#{
csha
}
--stat`
puts
"Updating gh-pages from
#{
old_sha
}
"
`git update-ref refs/heads/gh-pages
#{
csha
}
`
`git push origin gh-pages`
end
end
Back
|
FazBrowse Home
|
New Git URL