File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Expand file tree Collapse file tree 2 files changed +13
-7
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
- GITHUB_REPO =https://github.com/nipy/ nibabel
6
+ PROJECT = nibabel
7
7
#
8
8
# The Python executable to be used
9
9
#
@@ -137,7 +137,7 @@ website-stamp: $(WWW_DIR) html-stamp pdf-stamp
137
137
touch $@
138
138
139
139
upload-html : html-stamp
140
- ./tools/upload-gh-pages.sh $(WWW_DIR ) $(GITHUB_REPO )
140
+ ./tools/upload-gh-pages.sh $(WWW_DIR ) $(PROJECT )
141
141
142
142
#
143
143
# Sources
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
# Upload website to gh-pages
3
+ USAGE=" $0 <html_dir> <project-name> [<organization-name>]"
3
4
HTML_DIR=$1
4
5
if [ -z " $HTML_DIR " ]; then
5
- echo " Need to specify build directory "
6
+ echo $USAGE
6
7
exit 1
7
8
fi
8
- UPSTREAM_REPO =$2
9
- if [ -z " $UPSTREAM_REPO " ]; then
10
- echo " Need to specify upstream repo "
9
+ PROJECT =$2
10
+ if [ -z " $PROJECT " ]; then
11
+ echo $USAGE
11
12
exit 1
12
13
fi
14
+ ORGANIZATION=$3
15
+ if [ -z " $ORGANIZATION " ]; then
16
+ ORGANIZATION=nipy
17
+ fi
18
+ upstream_repo=" https://github.com/$ORGANIZATION /$PROJECT "
13
19
cd $HTML_DIR
14
20
git init
15
21
git checkout -b gh-pages
@@ -18,6 +24,6 @@ git add *
18
24
touch .nojekyll
19
25
git add .nojekyll
20
26
git commit -a -m " Documentation build - no history"
21
- git remote add origin $UPSTREAM_REPO
27
+ git remote add origin $upstream_repo
22
28
git push origin gh-pages --force
23
29
rm -rf .git # Yes
You can’t perform that action at this time.
0 commit comments