summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Allsopp <david.allsopp@metastack.com>2019-06-13 17:36:26 +0200
committerGitHub <noreply@github.com>2019-06-13 17:36:26 +0200
commitc03f0a55149d5e7b36294b1e9544e3d4480e7b7e (patch)
tree480f1740d07d14addb5cc395421d668d8d329e99
parent6e1b7f465e6e2f44e65d478d76b9e4ec60b965aa (diff)
parent64af50cfe2ab9404e29217afa7b1950628049270 (diff)
downloadocaml-c03f0a55149d5e7b36294b1e9544e3d4480e7b7e.tar.gz
Merge pull request #8652 from dra27/travis-branches
Widen the test for configure regeneration in Travis
-rwxr-xr-xautogen15
-rwxr-xr-xtools/ci/travis/travis-ci.sh30
-rw-r--r--tools/release-checklist6
3 files changed, 33 insertions, 18 deletions
diff --git a/autogen b/autogen
index 0cdc1b8c5c..1df7898293 100755
--- a/autogen
+++ b/autogen
@@ -13,12 +13,17 @@
#* *
#**************************************************************************
-autoconf -W all,error
+autoconf --force --warnings=all,error
# Some distros have the 2013 --runstatedir patch to autoconf (see
# http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=a197431414088a417b407b9b20583b2e8f7363bd
# in the GNU autoconf repo), and some don't, so ensure its effects are
# removed for CI consistency...
-sed -i -e '/^runstatedir/d' \
- -e '/-runstatedir /,+8d' \
- -e '/--runstatedir=DIR/d' \
- -e 's/ runstatedir//' configure
+# POSIX Notes
+# - sed -i without a backup file is not portable, hence configure.tmp
+# - GNU sed's /../,+8d becomes /../{N;..;d;} (and the last ; is important)
+sed -e '/^runstatedir/d' \
+ -e '/-runstatedir /{N;N;N;N;N;N;N;N;d;}' \
+ -e '/--runstatedir=DIR/d' \
+ -e 's/ runstatedir//' configure > configure.tmp
+mv -f configure.tmp configure
+chmod +x configure
diff --git a/tools/ci/travis/travis-ci.sh b/tools/ci/travis/travis-ci.sh
index ce3d9b0f5f..48349fbd9e 100755
--- a/tools/ci/travis/travis-ci.sh
+++ b/tools/ci/travis/travis-ci.sh
@@ -37,13 +37,20 @@ else
FETCH_HEAD=$TRAVIS_COMMIT
fi
-if [[ $TRAVIS_COMMIT != $(git rev-parse FETCH_HEAD) ]] ; then
- echo "WARNING! Travis TRAVIS_COMMIT and FETCH_HEAD do not agree!"
- if git cat-file -e $TRAVIS_COMMIT 2> /dev/null ; then
- echo "TRAVIS_COMMIT exists, so going with it"
- else
- echo "TRAVIS_COMMIT does not exist; setting to FETCH_HEAD"
- TRAVIS_COMMIT=$FETCH_HEAD
+if [[ $TRAVIS_EVENT_TYPE = 'push' ]] ; then
+ if ! git cat-file -e $TRAVIS_COMMIT 2> /dev/null ; then
+ echo 'TRAVIS_COMMIT does not exist - CI failure'
+ exit 1
+ fi
+else
+ if [[ $TRAVIS_COMMIT != $(git rev-parse FETCH_HEAD) ]] ; then
+ echo "WARNING! Travis TRAVIS_COMMIT and FETCH_HEAD do not agree!"
+ if git cat-file -e $TRAVIS_COMMIT 2> /dev/null ; then
+ echo "TRAVIS_COMMIT exists, so going with it"
+ else
+ echo "TRAVIS_COMMIT does not exist; setting to FETCH_HEAD"
+ TRAVIS_COMMIT=$FETCH_HEAD
+ fi
fi
fi
@@ -223,14 +230,15 @@ CheckTypoTree () {
else
echo "NOT checking $1: $path (typo.prune)"
fi
- if [[ $path = 'configure' || $path = 'configure.ac' ]] ; then
- touch CHECK_CONFIGURE
- fi
+ case "$path" in
+ configure|configure.ac|VERSION|tools/ci/travis/travis-ci.sh)
+ touch CHECK_CONFIGURE;;
+ esac
done)
rm -f tmp-index
if [ -e CHECK_CONFIGURE ] ; then
rm -f CHECK_CONFIGURE
- echo "configure or configure.ac altered in $1"
+ echo "configure generation altered in $1"
echo "Verifying that configure.ac generates configure"
git checkout "$1"
mv configure configure.ref
diff --git a/tools/release-checklist b/tools/release-checklist
index 2a9911bd6e..33c46df0ce 100644
--- a/tools/release-checklist
+++ b/tools/release-checklist
@@ -110,7 +110,8 @@ make tests
# for production releases: check and change the Changes header
# (remove "next version" and add a date)
# Update ocaml-variants.opam file to depend on the new version of ocaml.
-git add VERSION Changes ocaml-variants.opam
+./autogen
+git add VERSION Changes ocaml-variants.opam configure
git commit -m "last commit before tagging $VERSION"
# update VERSION with the new release; for example,
# 4.07.0+dev9-2018-06-26 => 4.07.0+rc2
@@ -123,7 +124,8 @@ git tag -m "release $VERSION" $VERSION
# 4.08.0 => 4.08.1+dev0
# for testing candidates, use N+dev(D+2) instead; for example,
# 4.07.0+rc2 => 4.07.0+dev10-2018-06-26
-git commit -m "increment version number after tagging $VERSION" VERSION
+./autogen
+git commit -m "increment version number after tagging $VERSION" VERSION configure
git push
git push --tags
```