Skip to content

Commit

Permalink
Add date diff.
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-fox committed Dec 4, 2023
1 parent 438507f commit 8ff55d6
Show file tree
Hide file tree
Showing 38 changed files with 250 additions and 2,585 deletions.
7 changes: 6 additions & 1 deletion .github/fiware/core/draco.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ QUAY_TARGET="quay.io/fiware/draco"
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 $VERSION | awk '{print $1}'`

echo "VERSION - $VERSION"
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."

function clone {
echo 'cloning from '"$1 $2"' to '"$3"
Expand Down
8 changes: 6 additions & 2 deletions .github/fiware/core/o2kconnector.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@ SOURCE="rdlabengpa/o2k-connector"
DOCKER_TARGET="fiware/o2k-connector"
QUAY_TARGET="quay.io/fiware/o2k-connector"


REPOSITORY="$(git rev-parse --show-toplevel)/$NAME"
TAGS="$(git -C $REPOSITORY rev-list --tags --max-count=1 )"
VERSIONv=$(git -C $REPOSITORY describe --exclude 'FIWARE*' --tags $TAGS )
VERSION=${VERSIONv#"v"}
DATE=`git -C $REPOSITORY log -1 --format=%ai $VERSIONv | awk '{print $1}'`

echo "VERSION - $VERSION"
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."

function clone {
echo 'cloning from '"$1 $2"' to '"$3"
Expand Down
7 changes: 6 additions & 1 deletion .github/fiware/core/orion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ QUAY_TARGET="quay.io/fiware/orion"
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 $VERSION | awk '{print $1}'`

echo "VERSION - $VERSION"
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."

function clone {
echo 'cloning from '"$1 $2"' to '"$3"
Expand Down
7 changes: 6 additions & 1 deletion .github/fiware/core/pyspark-connector.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ REPOSITORY="$(git rev-parse --show-toplevel)/$NAME"
TAGS="$(git -C $REPOSITORY rev-list --tags --max-count=1 )"
VERSIONv=$(git -C $REPOSITORY describe --exclude 'FIWARE*' --tags $TAGS )
VERSION=${VERSIONv#"v"}
DATE=`git -C $REPOSITORY log -1 --format=%ai $VERSIONv | awk '{print $1}'`

echo "VERSION - $VERSION"
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."

function clone {
echo 'cloning from '"$1 $2"' to '"$3"
Expand Down
7 changes: 6 additions & 1 deletion .github/fiware/core/quantum-leap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ QUAY_TARGET="quay.io/fiware/quantumleap"
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 $VERSION | awk '{print $1}'`

echo "VERSION - $VERSION"
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."

function clone {
echo 'cloning from '"$1 $2"' to '"$3"
Expand Down
7 changes: 6 additions & 1 deletion .github/fiware/core/scorpio-at-context-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ TAGS="$(git -C $REPOSITORY rev-list --tags --max-count=1 )"
VERSIONv=$(git -C $REPOSITORY describe --exclude 'FIWARE*' --tags $TAGS )

VERSION=`echo ${VERSIONv} | sed 's/-.*//'`
DATE=`git -C $REPOSITORY log -1 --format=%ai $VERSIONv | awk '{print $1}'`

echo "VERSION - $VERSION"
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."

function clone {
echo 'cloning from '"$1 $2"' to '"$3"
Expand Down
7 changes: 6 additions & 1 deletion .github/fiware/core/scorpio-entity-manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ REPOSITORY="$(git rev-parse --show-toplevel)/$NAME"
TAGS="$(git -C $REPOSITORY rev-list --tags --max-count=1 )"
VERSIONv=$(git -C $REPOSITORY describe --exclude 'FIWARE*' --tags $TAGS )
VERSION=`echo ${VERSIONv} | sed 's/-.*//'`
DATE=`git -C $REPOSITORY log -1 --format=%ai $VERSIONv | awk '{print $1}'`

echo "VERSION - $VERSION"
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."

function clone {
echo 'cloning from '"$1 $2"' to '"$3"
Expand Down
7 changes: 6 additions & 1 deletion .github/fiware/core/scorpio-history-entity.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ TAGS="$(git -C $REPOSITORY rev-list --tags --max-count=1 )"
VERSIONv=$(git -C $REPOSITORY describe --exclude 'FIWARE*' --tags $TAGS )

VERSION=`echo ${VERSIONv} | sed 's/-.*//'`
DATE=`git -C $REPOSITORY log -1 --format=%ai $VERSIONv | awk '{print $1}'`

echo "VERSION - $VERSION"
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."

function clone {
echo 'cloning from '"$1 $2"' to '"$3"
Expand Down
7 changes: 6 additions & 1 deletion .github/fiware/core/scorpio-history-query.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ TAGS="$(git -C $REPOSITORY rev-list --tags --max-count=1 )"
VERSIONv=$(git -C $REPOSITORY describe --exclude 'FIWARE*' --tags $TAGS )

VERSION=`echo ${VERSIONv} | sed 's/-.*//'`
DATE=`git -C $REPOSITORY log -1 --format=%ai $VERSIONv | awk '{print $1}'`

echo "VERSION - $VERSION"
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."

function clone {
echo 'cloning from '"$1 $2"' to '"$3"
Expand Down
7 changes: 6 additions & 1 deletion .github/fiware/core/scorpio-query-manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ TAGS="$(git -C $REPOSITORY rev-list --tags --max-count=1 )"
VERSIONv=$(git -C $REPOSITORY describe --exclude 'FIWARE*' --tags $TAGS )

VERSION=`echo ${VERSIONv} | sed 's/-.*//'`
DATE=`git -C $REPOSITORY log -1 --format=%ai $VERSIONv | awk '{print $1}'`

echo "VERSION - $VERSION"
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."

function clone {
echo 'cloning from '"$1 $2"' to '"$3"
Expand Down
7 changes: 6 additions & 1 deletion .github/fiware/core/scorpio-registry-manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ TAGS="$(git -C $REPOSITORY rev-list --tags --max-count=1 )"
VERSIONv=$(git -C $REPOSITORY describe --exclude 'FIWARE*' --tags $TAGS )

VERSION=`echo ${VERSIONv} | sed 's/-.*//'`
DATE=`git -C $REPOSITORY log -1 --format=%ai $VERSIONv | awk '{print $1}'`

echo "VERSION - $VERSION"
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."

function clone {
echo 'cloning from '"$1 $2"' to '"$3"
Expand Down
8 changes: 6 additions & 2 deletions .github/fiware/core/scorpio-subscription-manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ TAGS="$(git -C $REPOSITORY rev-list --tags --max-count=1 )"
VERSIONv=$(git -C $REPOSITORY describe --exclude 'FIWARE*' --tags $TAGS )

VERSION=`echo ${VERSIONv} | sed 's/-.*//'`
DATE=`git -C $REPOSITORY log -1 --format=%ai $VERSIONv | awk '{print $1}'`

echo "VERSION - $VERSION"

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."
function clone {
echo 'cloning from '"$1 $2"' to '"$3"
docker pull -q "$1":"$2"
Expand Down
7 changes: 6 additions & 1 deletion .github/fiware/core/scorpio-subscription-registry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ TAGS="$(git -C $REPOSITORY rev-list --tags --max-count=1 )"
VERSIONv=$(git -C $REPOSITORY describe --exclude 'FIWARE*' --tags $TAGS )

VERSION=`echo ${VERSIONv} | sed 's/-.*//'`
DATE=`git -C $REPOSITORY log -1 --format=%ai $VERSIONv | awk '{print $1}'`

echo "VERSION - $VERSION"
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."

function clone {
echo 'cloning from '"$1 $2"' to '"$3"
Expand Down
7 changes: 6 additions & 1 deletion .github/fiware/core/scorpio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ REPOSITORY="$(git rev-parse --show-toplevel)/$NAME"
TAGS="$(git -C $REPOSITORY rev-list --tags --max-count=1 )"
VERSIONv=$(git -C $REPOSITORY describe --exclude 'FIWARE*' --tags $TAGS )
VERSION=`echo ${VERSIONv} | sed 's/-.*//'`
DATE=`git -C $REPOSITORY log -1 --format=%ai $VERSIONv | awk '{print $1}'`

echo "VERSION - $VERSION"
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."

function clone {
echo 'cloning from '"$1 $2"' to '"$3"
Expand Down
7 changes: 6 additions & 1 deletion .github/fiware/core/stellio-api-gateway.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ QUAY_TARGET="quay.io/fiware/stellio-api-gateway"
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 $VERSION | awk '{print $1}'`

echo "VERSION - $VERSION"
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."

function clone {
echo 'cloning from '"$1 $2"' to '"$3"
Expand Down
7 changes: 6 additions & 1 deletion .github/fiware/core/stellio-search-service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ QUAY_TARGET="quay.io/fiware/stellio-search-service"
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 $VERSION | awk '{print $1}'`

echo "VERSION - $VERSION"
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."

function clone {
echo 'cloning from '"$1 $2"' to '"$3"
Expand Down
7 changes: 6 additions & 1 deletion .github/fiware/core/stellio-subscription-service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ QUAY_TARGET="quay.io/fiware/stellio-subscription-service"
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 $VERSION | awk '{print $1}'`

echo "VERSION - $VERSION"
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."

function clone {
echo 'cloning from '"$1 $2"' to '"$3"
Expand Down
7 changes: 6 additions & 1 deletion .github/fiware/core/sth-comet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ QUAY_TARGET="quay.io/fiware/sth-comet"
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 $VERSION | awk '{print $1}'`

echo "VERSION - $VERSION"
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."

function clone {
echo 'cloning from '"$1 $2"' to '"$3"
Expand Down
7 changes: 6 additions & 1 deletion .github/fiware/data-publication/business-apis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ QUAY_TARGET="quay.io/fiware/biz-ecosystem-apis"
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 $VERSION | awk '{print $1}'`

echo "VERSION - $VERSION"
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."

function clone {
echo 'cloning from '"$1 $2"' to '"$3"
Expand Down
7 changes: 6 additions & 1 deletion .github/fiware/data-publication/charging-backend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ QUAY_TARGET="quay.io/fiware/biz-ecosystem-charging-backend"
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 $VERSION | awk '{print $1}'`

echo "VERSION - $VERSION"
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."

function clone {
echo 'cloning from '"$1 $2"' to '"$3"
Expand Down
7 changes: 6 additions & 1 deletion .github/fiware/data-publication/idra.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ QUAY_TARGET="quay.io/fiware/idra"
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 $VERSION | awk '{print $1}'`

echo "VERSION - $VERSION"
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."

function clone {
echo 'cloning from '"$1 $2"' to '"$3"
Expand Down
7 changes: 6 additions & 1 deletion .github/fiware/data-publication/rss.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ QUAY_TARGET="quay.io/fiware/biz-ecosystem-rss"
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 $VERSION | awk '{print $1}'`

echo "VERSION - $VERSION"
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."

function clone {
echo 'cloning from '"$1 $2"' to '"$3"
Expand Down
8 changes: 2 additions & 6 deletions .github/fiware/image-clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,18 @@

MY_PATH="`dirname \"$0\"`"

git submodule update --recursive --remote
# git submodule update --recursive --remote

for file in "$MY_PATH/$1"/*.sh
do
if [[ $file == *"/x-"* ]]; then
if [[ "$2" ]]; then
echo "Skipping: '$file'"
else
echo "Reporting: '$file'"
$file
fi
$file
else
if [[ "$2" ]]; then
echo "Cloning Enabler: '$file'"
else
echo "Reporting: '$file'"
fi
$file $2 $3 $4
fi
Expand Down
7 changes: 6 additions & 1 deletion .github/fiware/iot-agents/iotagent-json.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ QUAY_TARGET="quay.io/fiware/iotagent-json"
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 $VERSION | awk '{print $1}'`

echo "VERSION - $VERSION"
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."

function clone {
echo 'cloning from '"$1 $2"' to '"$3"
Expand Down
7 changes: 6 additions & 1 deletion .github/fiware/iot-agents/iotagent-lightweightM2M.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ QUAY_TARGET="quay.io/fiware/lightweightm2m-iotagent"
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 $VERSION | awk '{print $1}'`

echo "VERSION - $VERSION"
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."

function clone {
echo 'cloning from '"$1 $2"' to '"$3"
Expand Down
Loading

0 comments on commit 8ff55d6

Please sign in to comment.