export SICS_* and new way to get changed file count

This commit is contained in:
Douglas Clowes
2014-08-07 16:25:38 +10:00
parent d398c57a05
commit ca553c68e6

View File

@@ -41,16 +41,20 @@ else
then
SICS_VER="$(git branch | grep '^*' | sed 's/^\* *//')"
SICS_REV="$(git log -1 --oneline | cut -d ' ' -f 1)"
SICS_PLUS="$(git status --porcelain -uno | wc -l)"
SICS_PLUS="$(git diff --name-status HEAD | wc -l)"
if [[ ${SICS_PLUS} > 0 ]]
then
SICS_REV="${SICS_REV}+${SICS_PLUS}"
fi
unset SICS_PLUS
else
SICS_VER="$USER"
SICS_REV="$(date '+%Y-%m-%d-%H-%m-%S')"
fi
fi
if [[ ${TARGET} == "SITE" || ${TARGET} == "ALL" ]]; then echo "ANSTO"; fi
export SICS_SITE="ANSTO"
export SICS_REV
export SICS_VER
if [[ ${TARGET} == "SITE" || ${TARGET} == "ALL" ]]; then echo "${SICS_SITE}"; fi
if [[ ${TARGET} == "BRANCH" || ${TARGET} == "ALL" ]]; then echo "${SICS_VER}"; fi
if [[ ${TARGET} == "REVISION" || ${TARGET} == "ALL" ]]; then echo "${SICS_REV}"; fi