Skip to content

Commit

Permalink
OS-4579 No buildstamp left behind
Browse files Browse the repository at this point in the history
Reviewed by: Joshua M. Clulow <jmc@joyent.com>
  • Loading branch information
rmustacc committed Jul 30, 2015
1 parent e90f494 commit d1bcc8c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tools/build_illumos
Expand Up @@ -23,9 +23,15 @@ export PATH=/opt/onbld/bin:/sbin:/usr/sbin:/usr/bin:/usr/ccs/bin:/opt/SUNWspro/b
mkdir -p ${ROOT}/proto
if [[ ! -f ${ROOT}/proto/buildstamp ]]; then
if [[ -z $BUILDSTAMP ]]; then
BUILDSTAMP=`TZ=UTC date "+%Y%m%dT%H%M%SZ"`; export BUILDSTAMP
BUILDSTAMP=$(TZ=UTC date "+%Y%m%dT%H%M%SZ"); export BUILDSTAMP
fi
echo "${BUILDSTAMP}" > ${ROOT}/proto/buildstamp
else
BUILDSTAMP=$(<${ROOT}/proto/buildstamp)
if [[ $? -ne 0 || -z "${BUILDSTAMP}" ]]; then
printf "failed to read existing buildstamp\n" >&2
exit 1
fi
echo ${BUILDSTAMP} > ${ROOT}/proto/buildstamp
fi

echo "==> Building Illumos (${BUILDSTAMP})"
Expand Down

0 comments on commit d1bcc8c

Please sign in to comment.