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"