Skip to content

Commit

Permalink
Merge pull request #8256 from Agoric/mfig-tweak-agd
Browse files Browse the repository at this point in the history
fix(agd): make script more robust
  • Loading branch information
michaelfig authored Aug 27, 2023
2 parents ad99406 + ce7d183 commit 2f87d77
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bin/agd
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ fi
print=()
fi
print+=( -print )
src=$(find "$GOLANG_DIR" \( -name '*.go' -o -name 'go.*' \) "${print[@]}" | head -1 || true)
src=$(find "$GOLANG_DIR" \( ! -name '*_test.go' -name '*.go' -o -name 'go.*' \) "${print[@]}" | head -1 || true)
test -z "$src" || {
echo "At least $src is newer than $stamp"

Expand Down
12 changes: 7 additions & 5 deletions repoconfig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ GOLANG_DAEMON=$GOLANG_DIR/build/agd
XSNAP_VERSION=agoric-upgrade-10

# Args are major, minor and patch version numbers
function golang_version_check() {
[ $1 -eq 1 ] && [ $2 -eq 20 ] && [ $3 -ge 2 ] && return 0
[ $1 -eq 1 ] && [ $2 -ge 21 ] && return 0
[ $1 -ge 2 ] && return 0
echo "need go version 1.20.2+, 1.21+, or 2+"
golang_version_check() {
{
[ "$1" -eq 1 ] && [ "$2" -eq 20 ] && [ "$3" -ge 2 ] && return 0
[ "$1" -eq 1 ] && [ "$2" -ge 21 ] && return 0
[ "$1" -ge 2 ] && return 0
} 2>/dev/null
echo 1>&2 "need go version 1.20.2+, 1.21+, or 2+"
return 1
}

0 comments on commit 2f87d77

Please sign in to comment.