From 3796dbfc42a72aeee5efb6a029e49a54ebdaac79 Mon Sep 17 00:00:00 2001 From: Jason Fox Date: Thu, 21 Dec 2023 14:28:52 +0100 Subject: [PATCH] Update --- .github/fiware/core/cygnus.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/fiware/core/cygnus.sh b/.github/fiware/core/cygnus.sh index 43782c52a..76a18ef4c 100755 --- a/.github/fiware/core/cygnus.sh +++ b/.github/fiware/core/cygnus.sh @@ -8,8 +8,14 @@ QUAY_TARGET="quay.io/fiware/cygnus-ngsi" REPOSITORY="$(git rev-parse --show-toplevel)/$NAME" TAGS="$(git -C $REPOSITORY rev-list --tags --max-count=1 )" VERSION=$(git -C $REPOSITORY describe --exclude 'FIWARE*' --tags $TAGS ) +DATE=`git -C $REPOSITORY log -1 --format=%ai $VERSIONv | awk '{print $1}'` + +function dateDiff { + CURRENTDATE=`date +"%Y-%m-%d"` + echo $(((`date -jf %Y-%m-%d "$CURRENTDATE" +%s` - `date -jf %Y-%m-%d "$1" +%s`)/86400)) +} +echo "$SOURCE - $VERSION - $(dateDiff $DATE) days old." -echo "VERSION - $VERSION" function clone { echo 'cloning from '"$1 $2"' to '"$3"