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
bd17c2cd
Commit
bd17c2cd
authored
6 years ago
by
Peterson, Peter
Browse files
Options
Downloads
Patches
Plain Diff
Add script to build dev site
parent
fa3c9eb2
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
+77
-0
77 additions, 0 deletions
buildconfig/Jenkins/dev_site.sh
with
77 additions
and
0 deletions
buildconfig/Jenkins/dev_site.sh
0 → 100755
+
77
−
0
View file @
bd17c2cd
if
[
-z
"
$BUILD_DIR
"
]
;
then
if
[
-z
"
$WORKSPACE
"
]
;
then
echo
"WORKSPACE not set. Cannot continue"
exit
1
fi
BUILD_DIR
=
$WORKSPACE
/build
echo
"Setting BUILD_DIR to
$BUILD_DIR
"
fi
if
[
-d
$BUILD_DIR
]
;
then
echo
"
$BUILD_DIR
exists"
else
mkdir
$BUILD_DIR
fi
###############################################################################
# Print out the versions of things we are using
###############################################################################
# we use cmake3 on rhel because cmake is too old
if
[
$(
command
-v
cmake3
)
]
;
then
CMAKE_EXE
=
cmake3
else
CMAKE_EXE
=
cmake
fi
${
CMAKE_EXE
}
--version
###############################################################################
# Generator
###############################################################################
if
[
"
$(
command
-v
ninja
)
"
]
;
then
CMAKE_GENERATOR
=
"-G Ninja"
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-mantid-builder:mantidproject/developer.git dev-docs/html || exit -1
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
if
[
"builder"
==
"
$USER
"
]
;
then
echo
"Setting username"
git config user.name mantid-builder
git config user.email
"mantid-buildserver@mantidproject.org"
fi
##### push the results
if
[
$(
git diff
--quiet
)
]
;
then
echo
"Committing new site"
git add
.
git commit
-m
"Automatic update of developer site"
git push
else
echo
"Nothing has changed"
fi
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