mirror of https://github.com/CGAL/cgal
Adapt the script for integration-4.5
This commit is contained in:
parent
4a2c4b9b55
commit
90692eb76f
|
|
@ -6,22 +6,36 @@ export LC_ALL
|
|||
# Returns an error once a command returns an error
|
||||
set -e
|
||||
|
||||
DRY_RUN=
|
||||
QUIET=--quiet
|
||||
|
||||
if [ "x$1" = "x--dry-run" -o "x$1" = "x-n" ]; then
|
||||
DRY_RUN=--dry-run
|
||||
shift
|
||||
fi
|
||||
|
||||
if [ -n "DRY_RUN" ]; then
|
||||
QUIET=
|
||||
fi
|
||||
|
||||
if [ -d "$1/.git" ]; then
|
||||
pushd "$1" > /dev/null
|
||||
branch=`git rev-parse --abbrev-ref HEAD`
|
||||
# echo "Git repository, in branch '$branch'"
|
||||
git fetch --quiet
|
||||
git reset --quiet --hard origin/$branch
|
||||
git clean --quiet -f
|
||||
git fetch $DRY_RUN $QUIET
|
||||
[ -z "$DRY_RUN" ] && git reset $QUIET --hard origin/$branch
|
||||
git clean $DRY_RUN $QUIET -f
|
||||
|
||||
ln -s -n -f "$1" $HOME/latest-internal-release-branch
|
||||
|
||||
# Hard-reset integration "every day", if today's "$branch" is integration
|
||||
# and create testsuite-Monday, testsuite-Tuesday, and so on...
|
||||
if [ x"$branch" = "xintegration" ]; then
|
||||
git push --quiet -f origin origin/$branch:refs/heads/`date '+testsuite-%A'` origin/master:integration
|
||||
git push $DRY_RUN $QUIET -f origin origin/$branch:refs/heads/`date '+testsuite-%A'` origin/master:integration
|
||||
elif [ x"$branch" = "xintegration-4.5" ]; then
|
||||
git push $DRY_RUN $QUIET -f origin origin/$branch:refs/heads/`date '+testsuite-%A'` origin/releases/CGAL-4.5-branch:integration-4.5
|
||||
else
|
||||
git push --quiet -f origin origin/$branch:refs/heads/`date '+testsuite-%A'`
|
||||
git push $DRY_RUN $QUIET -f origin origin/$branch:refs/heads/`date '+testsuite-%A'`
|
||||
fi
|
||||
|
||||
popd > /dev/null
|
||||
|
|
@ -62,5 +76,5 @@ ln -s "$1" "$HOME/CGAL/last-release-branch"
|
|||
# "$HOME/bin/update_manual_tools"
|
||||
|
||||
# Launch create_new_release, from the branch itself
|
||||
exec "$HOME/CGAL/last-release-branch/Scripts/developer_scripts/create_new_release" --no-scm-update "$@"
|
||||
[ -z "$DRY_RUN" ] && exec "$HOME/CGAL/last-release-branch/Scripts/developer_scripts/create_new_release" --no-scm-update "$@"
|
||||
# --no-scm-update because branches have already been updated
|
||||
|
|
|
|||
Loading…
Reference in New Issue