xhyve/xcscripts/version.sh
Jeremy Huddleston Sequoia aadbaa8475 Initial Xcode Project for xhyve
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2015-12-08 10:57:03 -08:00

11 lines
279 B
Bash
Executable file

#!/bin/bash
set -e -x
if [[ -d "${SRCROOT}/.git" ]] ; then
VERSION=$(GIT_DIR="${SRCROOT}"/.git git describe --abbrev=6 --dirty --always --tags)
else
VERSION="v${CURRENT_PROJECT_VERSION}"
fi
echo "#define VERSION \"${VERSION}\"" > "${DERIVED_FILE_DIR}/xhyve-version.h"