Skip to content

Commit

Permalink
Check local UDMI version against upstream (#274)
Browse files Browse the repository at this point in the history
  • Loading branch information
grafnu committed Mar 24, 2022
1 parent ccf9c3d commit baa696c
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 47 deletions.
27 changes: 27 additions & 0 deletions bin/check_version
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash -e
#
# This script intentionally runs silent if there is no version mismatch found.
#

ROOT_DIR=$(dirname $0)/..
cd $ROOT_DIR

branch=master
origin=`git remote -v | fgrep faucetsdn/udmi | awk '{print $1}' | uniq`

if [[ -z $origin ]]; then
echo No git origin found, adding faucetsdn...
git remote add faucetsdn https://github.com/faucetsdn/udmi.git
origin=faucetsdn
fi

git fetch $origin --tags 2>/dev/null
upstream_ver=`git describe $origin/$branch --abbrev=0`
current_ver=`git describe HEAD --abbrev=0 || echo unknown`

if [[ $current_ver != $upstream_ver ]]; then
echo
echo Local UDMI version $current_ver does not match upstream version $upstream_ver
echo Please consider updating as needed.
echo
fi
3 changes: 3 additions & 0 deletions bin/registrar
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ $ROOT_DIR/validator/bin/build > /dev/null
echo Running tools version `(cd $ROOT_DIR; git describe)`

$ROOT_DIR/validator/bin/registrar $site_path $project_id $* 2>&1

bin/check_version

4 changes: 4 additions & 0 deletions bin/sequencer
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,8 @@ echo
# Sort by test name (6th field)
fgrep 'RESULT ' $TEST_LOG | sort -k 6 | tee /tmp/sequencer.out

echo Running tools version `(cd $ROOT_DIR; git describe)`

bin/check_version

echo SUMMARY `awk '{print $5}' < /tmp/sequencer.out`
2 changes: 2 additions & 0 deletions bin/validator
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ else
echo No subscription supplied, assuming UDMI reflector.
$ROOT_DIR/validator/bin/validate $project_id schema reflect -- $site_path
fi

bin/check_version
16 changes: 0 additions & 16 deletions dashboard/.gcloudignore

This file was deleted.

31 changes: 0 additions & 31 deletions validator/.idea/runConfigurations/ConfigValidator.xml

This file was deleted.

0 comments on commit baa696c

Please sign in to comment.