Date: Sat, 29 Aug 2020 15:50:28 +0000 (UTC) From: Glen Barber <gjb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364959 - head/release Message-ID: <202008291550.07TFoS7O029724@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gjb Date: Sat Aug 29 15:50:27 2020 New Revision: 364959 URL: https://svnweb.freebsd.org/changeset/base/364959 Log: Add a VCSUPDATE command to run 'git pull' instead of 'git clone' if the tree already exists. Reported by: Michael Butler Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: head/release/release.sh Modified: head/release/release.sh ============================================================================== --- head/release/release.sh Sat Aug 29 15:31:23 2020 (r364958) +++ head/release/release.sh Sat Aug 29 15:50:27 2020 (r364959) @@ -70,6 +70,7 @@ env_setup() { exit 1 fi VCSCMD="/usr/local/bin/git clone -q" + VCSUPDATE="/usr/local/bin/git pull -q" # The default git checkout server, and branches for src/, doc/, # and ports/. @@ -220,13 +221,25 @@ chroot_setup() { mkdir -p ${CHROOTDIR}/usr if [ -z "${SRC_UPDATE_SKIP}" ]; then - ${VCSCMD} ${SRC} -b ${SRCBRANCH} ${CHROOTDIR}/usr/src + if [ -d "${CHROOTDIR}/usr/src" ]; then + cd ${CHROOTDIR}/usr/src && ${VCSUPDATE} && cd - + else + ${VCSCMD} ${SRC} -b ${SRCBRANCH} ${CHROOTDIR}/usr/src + fi fi if [ -z "${NODOC}" ] && [ -z "${DOC_UPDATE_SKIP}" ]; then - ${VCSCMD} ${DOC} -b ${DOCBRANCH} ${CHROOTDIR}/usr/doc + if [ -d "${CHROOTDIR}/usr/doc" ]; then + cd ${CHROOTDIR}/usr/doc && ${VCSUPDATE} && cd - + else + ${VCSCMD} ${DOC} -b ${DOCBRANCH} ${CHROOTDIR}/usr/doc + fi fi if [ -z "${NOPORTS}" ] && [ -z "${PORTS_UPDATE_SKIP}" ]; then - ${VCSCMD} ${PORT} -b ${PORTBRANCH} ${CHROOTDIR}/usr/ports + if [ -d "${CHROOTDIR}/usr/ports" ]; then + cd ${CHROOTDIR}/usr/ports && ${VCSUPDATE} && cd - + else + ${VCSCMD} ${PORT} -b ${PORTBRANCH} ${CHROOTDIR}/usr/ports + fi fi if [ -z "${CHROOTBUILD_SKIP}" ]; then
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008291550.07TFoS7O029724>