Mercurial > dovecot > core-2.2
changeset 19502:f76349851caa
Makefile, update-version.sh: Switched from hg to git.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Wed, 09 Dec 2015 18:38:00 +0200 |
parents | 42b5cde2d560 |
children | 7bb9955a39e5 |
files | Makefile.am update-version.sh |
diffstat | 2 files changed, 9 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile.am Wed Dec 09 17:37:13 2015 +0200 +++ b/Makefile.am Wed Dec 09 18:38:00 2015 +0200 @@ -22,8 +22,8 @@ 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
--- a/update-version.sh Wed Dec 09 17:37:13 2015 +0200 +++ b/update-version.sh Wed Dec 09 18:38:00 2015 +0200 @@ -21,9 +21,9 @@ 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 @@ 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}" <<EOF #ifndef DOVECOT_VERSION_H #define DOVECOT_VERSION_H -#define DOVECOT_VERSION_FULL VERSION" (${HGID})" +#define DOVECOT_VERSION_FULL VERSION" (${GITID})" #endif /* DOVECOT_VERSION_H */ EOF