Do not fail in absence of versioninfo
The tar command used do get the versioninfo content does not just return empty when versioninfo is absent: it fails, triggering set -e protection and resulting in the whole script failing. Fix makes sure the command is successful (by || true) even when it returns nothing. Fixes bug 1018820 Change-Id: I3605d070f1d8f5bb39f5751f7c9a8b4f78a7701b
This commit is contained in:
parent
610b472600
commit
40bed1816e
@ -56,7 +56,7 @@ if [ -f setup.py ] ; then
|
||||
# There should only be one, so this should be safe.
|
||||
tarball=$(echo dist/*.tar.gz)
|
||||
# If our tarball includes a versioninfo file, use that version
|
||||
snapshotversion=`tar --wildcards -O -z -xf $tarball *versioninfo 2>/dev/null`
|
||||
snapshotversion=`tar --wildcards -O -z -xf $tarball *versioninfo 2>/dev/null || true`
|
||||
if [ "x${snapshotversion}" = "x" ] ; then
|
||||
snapshotversion=$(find_next_version)
|
||||
echo mv "$tarball" "dist/$(basename $tarball .tar.gz)${SEPARATOR}${snapshotversion}.tar.gz"
|
||||
|
Loading…
x
Reference in New Issue
Block a user