export SICS_* and new way to get changed file count
This commit is contained in:
@@ -41,16 +41,20 @@ else
|
|||||||
then
|
then
|
||||||
SICS_VER="$(git branch | grep '^*' | sed 's/^\* *//')"
|
SICS_VER="$(git branch | grep '^*' | sed 's/^\* *//')"
|
||||||
SICS_REV="$(git log -1 --oneline | cut -d ' ' -f 1)"
|
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 ]]
|
if [[ ${SICS_PLUS} > 0 ]]
|
||||||
then
|
then
|
||||||
SICS_REV="${SICS_REV}+${SICS_PLUS}"
|
SICS_REV="${SICS_REV}+${SICS_PLUS}"
|
||||||
fi
|
fi
|
||||||
|
unset SICS_PLUS
|
||||||
else
|
else
|
||||||
SICS_VER="$USER"
|
SICS_VER="$USER"
|
||||||
SICS_REV="$(date '+%Y-%m-%d-%H-%m-%S')"
|
SICS_REV="$(date '+%Y-%m-%d-%H-%m-%S')"
|
||||||
fi
|
fi
|
||||||
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} == "BRANCH" || ${TARGET} == "ALL" ]]; then echo "${SICS_VER}"; fi
|
||||||
if [[ ${TARGET} == "REVISION" || ${TARGET} == "ALL" ]]; then echo "${SICS_REV}"; fi
|
if [[ ${TARGET} == "REVISION" || ${TARGET} == "ALL" ]]; then echo "${SICS_REV}"; fi
|
||||||
|
|||||||
Reference in New Issue
Block a user