1
1

tools: add flag to avoid git pull during tarball create

it breaks jenkins scripts because jenkins fetches the branch and disconnects it from the repo.
hence git pull fails
Этот коммит содержится в:
Mike Dubman 2014-10-08 12:16:08 +03:00
родитель 23cb00d7d5
Коммит 81917412a8

22
contrib/dist/make_dist_tarball поставляемый
Просмотреть файл

@ -53,6 +53,7 @@ dirty_ok=0
gnu_version_ignore=0
dist_target=distcheck
distcheck_flags="AM_MAKEFLAGS=$DISTCHECK_MAKE_FLAGS"
git_update=1
if test "`basename $0`" = "make_tarball"; then
dist_target=dist
@ -73,6 +74,7 @@ while test "$1" != ""; do
--distdir) distdir=$2; shift ;;
--dirtyok) dirty_ok=1; shift ;;
--verok) gnu_version_ignore=1;;
--no-git-update) git_update=0;;
*)
cat <<EOF
Unrecognized argument: $1
@ -85,6 +87,7 @@ Valid arguments:
--distdir Move the tarball(s) to this directory when done
--dirtyok Ok if the source tree is dirty
--verok Ignore result of autotools version checking
--no-git-update Skip "git pull" part, assume local repo is updated already
EOF
exit 1
;;
@ -332,14 +335,17 @@ else
exit 1
fi
#
# Get the latest
#
echo "*** Git pull to get the latest..."
git pull --rebase
if test $? -ne 0; then
echo "*** Git pull failed. Cannot continue."
exit 1
if test $git_update -eq 1; then
#
# Get the latest
#
echo "*** Git pull to get the latest..."
git pull --rebase
if test $? -ne 0; then
echo "*** Git pull failed. Cannot continue."
exit 1
fi
fi
#