-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check local UDMI version against upstream (#274)
- Loading branch information
Showing
6 changed files
with
36 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.