From: Timo Sirainen Date: Wed, 9 Dec 2015 16:38:00 +0000 (+0200) Subject: Makefile, update-version.sh: Switched from hg to git. X-Git-Tag: 2.2.22.rc1~418 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8232ca302ed650200ea91cb6d5438379d187753e;p=thirdparty%2Fdovecot%2Fcore.git Makefile, update-version.sh: Switched from hg to git. --- diff --git a/Makefile.am b/Makefile.am index e50e49e7af..c83365fb9f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -22,8 +22,8 @@ noinst_DATA = dovecot-config nodist_pkginclude_HEADERS = config.h if MAINTAINER_MODE -ChangeLog: .hg/dirstate - hg log -r tip:fef8259e7277 --style=changelog > ChangeLog +ChangeLog: .git/ORIG_HEAD + git log 2.2.alpha1..HEAD > ChangeLog endif aclocal_DATA = dovecot.m4 diff --git a/update-version.sh b/update-version.sh index 5e2b264c00..5a3db800e8 100644 --- a/update-version.sh +++ b/update-version.sh @@ -21,9 +21,9 @@ abspath() abspath "${SRCDIR}" 1 abspath "${BUILDDIR}" 2 -# when using a different BUILDDIR just copy from SRCDIR, if there is no .hg +# when using a different BUILDDIR just copy from SRCDIR, if there is no .git if [ "${BUILDDIR}" != "${SRCDIR}" ]; then - if [ ! -d "${SRCDIR}/.hg" ] && [ -f "${SRCDIR}/${VERSION_H}" ]; then + if [ ! -d "${SRCDIR}/.git" ] && [ -f "${SRCDIR}/${VERSION_H}" ]; then cmp -s "${SRCDIR}/${VERSION_H}" "${BUILDDIR}/${VERSION_H}" if [ $? -ne 0 ]; then cp "${SRCDIR}/${VERSION_H}" "${BUILDDIR}/${VERSION_H}" @@ -32,22 +32,19 @@ if [ "${BUILDDIR}" != "${SRCDIR}" ]; then fi fi -# Don't generate dovecot-version.h if the source tree has no .hg dir but +# Don't generate dovecot-version.h if the source tree has no .git dir but # a dovecot-version.h. This may be the result of a release/nightly tarball. -[ ! -d "${SRCDIR}/.hg" ] && [ -f "${BUILDDIR}/${VERSION_H}" ] && exit 0 +[ ! -d "${SRCDIR}/.git" ] && [ -f "${BUILDDIR}/${VERSION_H}" ] && exit 0 # Lets generate the dovecot-version.h [ -f "${BUILDDIR}/${VERSION_HT}" ] && rm -f "${BUILDDIR}/${VERSION_HT}" -python "${SRCDIR}/is-tagged.py" "${SRCDIR}" -if [ $? = 1 ]; then - # older hg doesn't recognize option -i - #HGID=`hg -R ${SRCDIR} id -i 2>/dev/null` - HGID=`hg -R ${SRCDIR} id 2>/dev/null | awk '{print $1}'` +if true; then + GITID=`git rev-parse --short HEAD` cat > "${BUILDDIR}/${VERSION_HT}" <