Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check local UDMI version against upstream #274

Merged
merged 17 commits into from
Mar 24, 2022
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`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBH I'm a little surprised that we can't do tihs a little more explicitly with git remote, but, at a quick glance it seems not. No problem for now though.


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

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

<<<<<<< HEAD
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a hereto construction? I don't see ending HEAD?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leftover from a botched merge

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

echo SUMMARY `fgrep 'RESULT ' $TEST_LOG | awk '{print $3, $2}' | sort | awk '{print $2}'`

bin/check_version
=======
echo SUMMARY `awk '{print $5}' < /tmp/sequencer.out`
>>>>>>> master
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar confusion?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leftover from a botched merge

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.