3 SCRIPTS_DIR
=$
(cd "$(dirname "$0")" && pwd)
4 PROJECT_DIR
="${SCRIPTS_DIR}/../.."
6 VERSION
=$
(cat ${PROJECT_DIR}/version.txt
)
7 LAST_COMMIT
=$
(git log
--oneline -n 1 --pretty=format
:%h
${PROJECT_DIR})
8 DIFF
=$
(git
diff ${PROJECT_DIR})
10 if [ -z "$DIFF" ]; then
11 echo "${VERSION}-${LAST_COMMIT}"
13 echo "${VERSION}-${LAST_COMMIT}-dirty"