Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
358acc90
Commit
358acc90
authored
6 years ago
by
T Jubb
Browse files
Options
Downloads
Plain Diff
Refs #22930 merge master.
parents
554d8ca5
4eaf7ed8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
buildconfig/Jenkins/dev_site.sh
+27
-40
27 additions, 40 deletions
buildconfig/Jenkins/dev_site.sh
with
27 additions
and
40 deletions
buildconfig/Jenkins/dev_site.sh
+
27
−
40
View file @
358acc90
...
@@ -9,64 +9,51 @@ if [ -z "$BUILD_DIR" ]; then
...
@@ -9,64 +9,51 @@ if [ -z "$BUILD_DIR" ]; then
echo
"Setting BUILD_DIR to
$BUILD_DIR
"
echo
"Setting BUILD_DIR to
$BUILD_DIR
"
fi
fi
###############################################################################
# Set up the build directory
###############################################################################
if
[
-d
$BUILD_DIR
]
;
then
if
[
-d
$BUILD_DIR
]
;
then
echo
"
$BUILD_DIR
exists"
echo
"
$BUILD_DIR
exists - updating existing checkout"
cd
$BUILD_DIR
git pull
--rebase
else
else
mkdir
$BUILD_DIR
echo
"
$BUILD_DIR
does not exist - cloning developer site"
git clone
-b
gh-pages git@github.com-mantid-builder:mantidproject/developer.git
$BUILD_DIR
||
exit
-1
cd
$BUILD_DIR
fi
fi
###############################################################################
###############################################################################
#
Print out the versions of things we are using
#
Setup virtualenv for building the docs
###############################################################################
###############################################################################
# we use cmake3 on rhel because cmake is too old
VIRTUAL_ENV
=
$BUILD_DIR
/virtualenv
if
[
$(
command
-v
cmake3
)
]
;
then
if
[[
!
-d
$VIRTUAL_ENV
]]
;
then
CMAKE_EXE
=
cmake3
virtualenv
--system-site-packages
"
$VIRTUAL_ENV
"
source
$VIRTUAL_ENV
/bin/activate
pip
install
sphinx
pip
install
sphinx_bootstrap_theme
else
else
CMAKE_EXE
=
cmak
e
source
$VIRTUAL_ENV
/bin/activat
e
fi
fi
${
CMAKE_EXE
}
--versi
on
which pyth
on
###############################################################################
###############################################################################
# Generator
# Build the developer site
# -----------------------------------------------------------------------------
# the wacky long line is what is run from inside "sphinx-build" which is not
# installed by virtualenv for some reason
###############################################################################
###############################################################################
if
[
"
$(
command
-v
ninja
)
"
]
;
then
SPHINX_VERS
=
$(
python
-c
"import sphinx;print sphinx.__version__"
)
CMAKE_GENERATOR
=
"-G Ninja"
python
-c
"import sys;from pkg_resources import load_entry_point;sys.exit(load_entry_point('Sphinx==
$SPHINX_VERS
', 'console_scripts', 'sphinx-build')())"
$WORKSPACE
/dev-docs/source
$BUILD_DIR
elif
[
"
$(
command
-v
ninja-build
)
"
]
;
then
CMAKE_GENERATOR
=
"-G Ninja"
fi
##### set up the build directory
cd
$BUILD_DIR
if
[
-e
$BUILD_DIR
/CMakeCache.txt
]
;
then
${
CMAKE_EXE
}
.
else
${
CMAKE_EXE
}
${
CMAKE_GENERATOR
}
..
fi
if
[
-d
dev-docs/html
]
;
then
echo
"Updating existing checkout"
cd
dev-docs/html
git pull
--rebase
cd
-
else
echo
"Cloning developer site"
git clone git@github.com:mantidproject/developer.git dev-docs/html
||
exit
-1
cd
dev-docs/html
git checkout gh-pages
cd
-
fi
##### build the developer site
${
CMAKE_EXE
}
--build
.
--target
dev-docs-html
cd
dev-docs/html
###############################################################################
# Push the results
###############################################################################
if
[
"builder"
==
"
$USER
"
]
;
then
if
[
"builder"
==
"
$USER
"
]
;
then
echo
"Setting username"
echo
"Setting username"
git config user.name mantid-builder
git config user.name mantid-builder
git config user.email
"mantid-buildserver@mantidproject.org"
git config user.email
"mantid-buildserver@mantidproject.org"
fi
fi
##### push the results
if
[
$(
git diff
--quiet
)
]
;
then
if
[
$(
git diff
--quiet
)
]
;
then
echo
"Committing new site"
echo
"Committing new site"
git add
.
git add
.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment