scripts: fix prerelease detection

This commit is contained in:
Mitchell Hashimoto 2013-06-28 10:35:24 -04:00
parent 3868a69dec
commit f030623b62
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ cd $DIR
# of packer/version.go.
VERSION=$(grep "const Version " packer/version.go | sed -E 's/.*"(.+)"$/\1/')
VERSIONDIR="${VERSION}"
PREVERSION=$(grep "const VersionPrerelease " packer/version.go | sed -E 's/.*"(.+)"$/\1/')
PREVERSION=$(grep "const VersionPrerelease " packer/version.go | sed -E 's/.*"(.*)"$/\1/')
if [ ! -z $PREVERSION ]; then
PREVERSION="${PREVERSION}.$(date -u +%s)"
VERSIONDIR="${VERSIONDIR}-${PREVERSION}"