File tree Expand file tree Collapse file tree 2 files changed +36
-13
lines changed Expand file tree Collapse file tree 2 files changed +36
-13
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ HTML_DIR=build/html
3
3
LATEX_DIR =build/latex
4
4
WWW_DIR =build/website
5
5
DOCSRC_DIR =doc
6
- SF_USER ?= matthewbrett
6
+ GITHUB_REPO =https://github.com/nipy/nibabel
7
7
#
8
8
# The Python executable to be used
9
9
#
@@ -121,23 +121,23 @@ gitwash-update: build
121
121
# Website
122
122
#
123
123
124
- website : website -stamp
125
- website -stamp : $(WWW_DIR ) htmldoc pdfdoc
124
+ html : html -stamp
125
+ html -stamp : $(WWW_DIR ) htmldoc
126
126
cp -r $(HTML_DIR ) /* $(WWW_DIR )
127
- cp $(LATEX_DIR ) /* .pdf $(WWW_DIR )
128
127
touch $@
129
128
129
+ pdf : pdf-stamp
130
+ pdf-stamp : $(WWW_DIR ) pdfdoc
131
+ cp $(LATEX_DIR ) /* .pdf $(WWW_DIR )
132
+ touch $@
130
133
131
- upload-website : website
132
- rsync -rzhvp --delete --chmod=Dg+s,g+rw $(WWW_DIR ) /* \
133
- web.sourceforge.net:/home/groups/n/ni/niftilib/htdocs/nibabel/
134
-
135
- # This one udates for the specific user named at the top of the makefile
136
- upload-htmldoc : htmldoc upload-htmldoc-$(SF_USER )
134
+ website : website-stamp
135
+ website-stamp : $(WWW_DIR ) html-stamp pdf-stamp
136
+ cp -r $(HTML_DIR ) /* $(WWW_DIR )
137
+ touch $@
137
138
138
- upload-htmldoc-% : htmldoc
139
- rsync -rzhvp --delete --chmod=Dg+s,g+rw $(HTML_DIR ) /* \
140
- $* ,
[email protected] :/home/groups/n/ni/nipy/htdocs/nibabel/
139
+ upload-html : html-stamp
140
+ ./doc/tools/upload-gh-pages.sh $(WWW_DIR ) $(GITHUB_REPO )
141
141
142
142
#
143
143
# Sources
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # Upload website to gh-pages
3
+ HTML_DIR=$1
4
+ if [ -z " $HTML_DIR " ]; then
5
+ echo " Need to specify build directory"
6
+ exit 1
7
+ fi
8
+ UPSTREAM_REPO=$2
9
+ if [ -z " $UPSTREAM_REPO " ]; then
10
+ echo " Need to specify upstream repo"
11
+ exit 1
12
+ fi
13
+ cd $HTML_DIR
14
+ git init
15
+ git checkout -b gh-pages
16
+ git add *
17
+ # A nojekyll file is needed to tell github that this is *not* a jekyll site:
18
+ touch .nojekyll
19
+ git add .nojekyll
20
+ git commit -a -m " Documentation build - no history"
21
+ git remote add origin $UPSTREAM_REPO
22
+ git push origin gh-pages --force
23
+ rm -rf .git # Yes
You can’t perform that action at this time.
0 commit comments