summaryrefslogtreecommitdiff
path: root/release/Makefile.mirrors
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2020-07-16 20:34:26 +0000
committerGlen Barber <gjb@FreeBSD.org>2020-07-16 20:34:26 +0000
commit29b282f31d7388dfd9806fd1a0df8c37784482d8 (patch)
tree5468bf71e60dad060020474b6a4be5a1223fa4c8 /release/Makefile.mirrors
parente2c0e292e8a7ca00ba99bcfccc9e637f45c3e8b1 (diff)
downloadsrc-test-29b282f31d7388dfd9806fd1a0df8c37784482d8.tar.gz
src-test-29b282f31d7388dfd9806fd1a0df8c37784482d8.zip
Makefile.inc1:
- New file. Adds logic to search for the git binary, as well as determining the branch and revision, used in various places. Makefile: - Remove searching for the svn{,lite} binary. Makefile.ec2: - Reduce duplicated code, removing searching for the svn{,lite} binary, in addition to EC2_SVN{BRANCH,REV}. - Rename EC2_SVN* with GIT* for consistency. Makefile.mirrors: - Remove the SRCBRANCH declaration, replaced with the exported GITBRANCH variable. - Update _SNAP_SUFFIX from SVNREVISION to GITREV, and remove the leading 'r' from it, since it will break git hashes. - Remove yet another instance of duplicated code to search for the svn{,version}lite binary. Sponsored by: Rubicon Communications, LLC (netgate.com)
Notes
Notes: svn path=/projects/release-git/; revision=363258
Diffstat (limited to 'release/Makefile.mirrors')
-rw-r--r--release/Makefile.mirrors27
1 files changed, 5 insertions, 22 deletions
diff --git a/release/Makefile.mirrors b/release/Makefile.mirrors
index 6857ff0eafb13..5ce952fce27a0 100644
--- a/release/Makefile.mirrors
+++ b/release/Makefile.mirrors
@@ -19,7 +19,6 @@ FTPDIR?= ${RELEASEDIR}/ftp-stage
.if exists(${RELEASEDIR})
STAGE_TARGETS?= iso-images-stage
.endif
-SRCBRANCH!= ${SVN_CMD} info --show-item relative-url ${WORLDDIR}
.if (defined(EMBEDDED_TARGET) && !empty(EMBEDDED_TARGET)) || (defined(EMBEDDEDBUILD) && !empty(EMBEDDEDBUILD))
. if ${TARGET:Marm*} != "" || ${EMBEDDED_TARGET:Marm*} != ""
@@ -31,26 +30,10 @@ EMBEDDED= 1
.if ${BRANCH} == "STABLE" || ${BRANCH} == "CURRENT" || ${BRANCH} == "PRERELEASE" || ${BRANCH:MALPHA*} != ""
SNAPSHOT= 1
TLD?= ${FTPDIR}/snapshots
-. if !defined(SVNREVISION) || empty(SVNREVISION)
-. for _D in /usr/bin /usr/local/bin
-. for _S in svnversion svnliteversion
-. if exists(${_D}/${_S})
-SVNVERSION?= ${_D}/${_S}
-. endif
-. endfor
-. endfor
-. if exists(${SVNVERSION}) && !empty(SVNVERSION)
-SVNREVISION!= ${SVNVERSION} ${WORLDDIR}/Makefile
-. endif
-. endif # !defined(SVNREVISION)
-. if !defined(BUILDDATE) || empty(BUILDDATE)
-. if exists(${.CURDIR}/${.OBJDIR}/dist/base/bin/sh)
-BUILDDATE!= cd ${.CURDIR} && date -j -f '%s' $$(stat -f "%c" ${.OBJDIR}/dist/base/bin/sh) +%Y%m%d
-. else
+.if !defined(BUILDDATE) || empty(BUILDDATE)
BUILDDATE!= date +%Y%m%d
-. endif
-. endif
-_SNAP_SUFFIX:= ${BUILDDATE}-r${SVNREVISION}
+.endif
+_SNAP_SUFFIX:= ${BUILDDATE}-${GITREV}
.else
# release
SNAPSHOT=
@@ -187,8 +170,8 @@ iso-images-stage:
mkdir -p ${FTP_DIR}
cp -p ${RELEASEDIR}/ftp/*.txz ${RELEASEDIR}/ftp/MANIFEST ${FTP_DIR}
echo ${BUILDDATE} > ${FTP_DIR}/BUILDDATE
- echo ${SRCBRANCH} > ${FTP_DIR}/SRCBRANCH
- echo r${SVNREVISION} > ${FTP_DIR}/REVISION
+ echo ${GITBRANCH} > ${FTP_DIR}/GITBRANCH
+ echo ${GITREV} > ${FTP_DIR}/REVISION
cd ${TLD}/${TARGET} && \
ln -s ${TARGET_ARCH}/${REVISION}-${BRANCH} \
${REVISION}-${BRANCH}