mirror of https://github.com/CGAL/cgal
53 lines
1.5 KiB
Bash
Executable File
53 lines
1.5 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
LC_ALL=POSIX;
|
|
export LC_ALL
|
|
|
|
if [ -d "$1/.git" ]; then
|
|
pushd "$1"
|
|
branch=`git rev-parse --abbrev-ref HEAD`
|
|
echo "Git repository, in branch '$branch'"
|
|
git fetch
|
|
git reset --hard origin/$branch
|
|
git clean -f
|
|
|
|
# Hard-reset integration "every day" even if today's "$branch" is not integration
|
|
# and create testsuite-Monday, testsuite-Tuesday, and so on...
|
|
git push -f origin origin/$branch:refs/heads/`date '+testsuite-%A'` origin/master:integration
|
|
|
|
popd
|
|
else
|
|
svn up "$1"
|
|
fi
|
|
|
|
# Update the candidates branch, if any.
|
|
[ -d "$2" ] && svn up "$2"
|
|
|
|
# Update the symbolic links, using $1 and $2
|
|
rm "$HOME/CGAL/last-release-branch"
|
|
rm "$HOME/CGAL/last-manual_tools-branch"
|
|
rm "$HOME/CGAL/last-manual-branch"
|
|
|
|
ln -s "$1" "$HOME/CGAL/last-release-branch"
|
|
|
|
# Search the Manual and Manual_tools package in candidates, if any.
|
|
# Else use the main branch.
|
|
if [ -d "$2" -a -d "$2/Manual_tools" ]; then
|
|
ln -s "$2" "$HOME/CGAL/last-manual_tools-branch";
|
|
else
|
|
ln -s "$1" "$HOME/CGAL/last-manual_tools-branch";
|
|
fi
|
|
if [ -d "$2" -a -d "$2/Manual" ]; then
|
|
ln -s "$2" "$HOME/CGAL/last-manual-branch";
|
|
else
|
|
ln -s "$1" "$HOME/CGAL/last-manual-branch";
|
|
fi
|
|
|
|
# Update the manual tools
|
|
# They are used in create_new_release to build the installation manual.
|
|
"$HOME/bin/update_manual_tools"
|
|
|
|
# Launch create_new_release
|
|
exec "$HOME/CGAL/Scripts/developer_scripts/create_new_release" --no-scm-update "$@"
|
|
# --no-scm-update because branches have already been updated
|