aboutsummaryrefslogtreecommitdiff
path: root/release/release.sh
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2014-02-25 22:13:48 +0000
committerGlen Barber <gjb@FreeBSD.org>2014-02-25 22:13:48 +0000
commit9bb84a63b7889d9d21c5e2c6d1a7d30b95453f7e (patch)
tree8c0963b4e1a4523977d0d7d25799e0045f0f8132 /release/release.sh
parent70c9dd3e3d5de066b62dc32e078f90457dbbd148 (diff)
downloadsrc-9bb84a63b7889d9d21c5e2c6d1a7d30b95453f7e.tar.gz
src-9bb84a63b7889d9d21c5e2c6d1a7d30b95453f7e.zip
release.sh:
- Add a VCSCMD variable that defaults to 'svn checkout', and update places 'svn co' is used directly. - After sourcing a configuration file, prefix SRCBRANCH, PORTBRANCH, and DOCBRANCH with the SVNROOT. - Properly capitalize 'FreeBSD.org' in the default SVNROOT. - Update Copyright. release.conf.sample: - Add an example to use git instead of svn, by nullifying SVNROOT, and setting SRCBRANCH, DOCBRANCH, and PORTBRANCH to the URL fo a git repository. release.7: - Document VCSCMD. Submitted by: Rick Miller (based on) Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/head/; revision=262499
Diffstat (limited to 'release/release.sh')
-rwxr-xr-xrelease/release.sh20
1 files changed, 16 insertions, 4 deletions
diff --git a/release/release.sh b/release/release.sh
index 79419c4feb5e..0a373cc0559a 100755
--- a/release/release.sh
+++ b/release/release.sh
@@ -1,9 +1,13 @@
#!/bin/sh
#-
+# Copyright (c) 2013, 2014 The FreeBSD Foundation
# Copyright (c) 2013 Glen Barber
# Copyright (c) 2011 Nathan Whitehorn
# All rights reserved.
#
+# Portions of this software were developed by Glen Barber
+# under sponsorship from the FreeBSD Foundation.
+#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
@@ -38,9 +42,12 @@ export PATH
# The directory within which the release will be built.
CHROOTDIR="/scratch"
+# The default version control system command to obtain the sources.
+VCSCMD="svn checkout"
+
# The default svn checkout server, and svn branches for src/, doc/,
# and ports/.
-SVNROOT="svn://svn.freebsd.org"
+SVNROOT="svn://svn.FreeBSD.org/"
SRCBRANCH="base/head@rHEAD"
DOCBRANCH="doc/head@rHEAD"
PORTBRANCH="ports/head@rHEAD"
@@ -98,6 +105,11 @@ while getopts c: opt; do
done
shift $(($OPTIND - 1))
+# Prefix the branches with the SVNROOT for the full checkout URL.
+SRCBRANCH="${SVNROOT}${SRCBRANCH}"
+DOCBRANCH="${SVNROOT}${DOCBRANCH}"
+PORTBRANCH="${SVNROOT}${PORTBRANCH}"
+
# If PORTS is set and NODOC is unset, force NODOC=yes because the ports tree
# is required to build the documentation set.
if [ "x${NOPORTS}" != "x" ] && [ "x${NODOC}" = "x" ]; then
@@ -155,12 +167,12 @@ set -e # Everything must succeed
mkdir -p ${CHROOTDIR}/usr
-svn co ${FORCE_SRC_KEY} ${SVNROOT}/${SRCBRANCH} ${CHROOTDIR}/usr/src
+${VCSCMD} ${FORCE_SRC_KEY} ${SRCBRANCH} ${CHROOTDIR}/usr/src
if [ "x${NODOC}" = "x" ]; then
- svn co ${SVNROOT}/${DOCBRANCH} ${CHROOTDIR}/usr/doc
+ ${VCSCMD} ${DOCBRANCH} ${CHROOTDIR}/usr/doc
fi
if [ "x${NOPORTS}" = "x" ]; then
- svn co ${SVNROOT}/${PORTBRANCH} ${CHROOTDIR}/usr/ports
+ ${VCSCMD} ${PORTBRANCH} ${CHROOTDIR}/usr/ports
fi
cd ${CHROOTDIR}/usr/src