Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Update gridlabd-version #1024

Merged
merged 1 commit into from
Nov 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions gldcore/scripts/gridlabd-version
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ function error()
exit $RC
}

function warning()
{
echo "WARNING [$EXE] $*" > /dev/stderr
}

case "$1" in
--dryrun)
ACTION="echo"
Expand Down Expand Up @@ -49,8 +54,8 @@ function version-check()
branch=$(${BIN} --version=git-branch)
remote=$( (curl -sL "https://raw.githubusercontent.com/slacgismo/gridlabd/$branch/gldcore/version.h" | grep '#define REV_' | cut -f3 -d' ' | tr '\n' . | cut -f-3 -d.) || echo "none" )
if [ "$remote" == "none" -o -z "$remote" ]; then
[ "$1" != "-q" -a "$1" != "-w" ] && error 2 "$version ($branch) remote not found"
[ "$1" != "-q" ] && warning "$version ($branch) remote not found"
[ "$1" != "-q" -a "$1" != "-w" ] && error 2 "$version ($branch) branch not found on github"
[ "$1" != "-q" ] && warning "$version ($branch) branch not found on github"
exit 0
fi
[ "$1" == "-v" ] && echo "REMOTE/$branch $remote"
Expand Down