Skip to content

Commit

Permalink
check_deps: fix the check for stable NeoGo revisions used in nft-nd-nns
Browse files Browse the repository at this point in the history
vX.Y.Z-date-commit is very much different from vX.Y.Z and we can have any of
them for NeoGo (vX.Y.Z is even preferable). Previous code ended up this way
for v0.106.3:

++ sed -E -n -e 's/.*neo-go\s.+-.+-(\w+)/\1/ p' examples/nft-nd-nns//go.mod
+ NEO_GO_COMMIT=
+ git merge-base --is-ancestor '' HEAD
fatal: Not a valid object name
+ die 'examples/nft-nd-nns/: neo-go commit  was not found in git'
+ echo 'examples/nft-nd-nns/: neo-go commit  was not found in git'
examples/nft-nd-nns/: neo-go commit  was not found in git
+ exit 1

Signed-off-by: Roman Khimov <roman@nspcc.ru>
  • Loading branch information
roman-khimov committed Sep 4, 2024
1 parent f614cc3 commit 09921bb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/check_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ for dir in examples/*/; do

if [ -z "${dir#*nft-nd-nns/}" ]; then
NEO_GO_COMMIT="$(sed -E -n -e 's/.*neo-go\s.+-.+-(\w+)/\1/ p' "$dir/go.mod")"
if [ -z "$NEO_GO_COMMIT" ]; then
NEO_GO_COMMIT="$(sed -E -n -e 's/.*neo-go\s(\w+)/\1/ p' "$dir/go.mod")"
fi
git merge-base --is-ancestor "$NEO_GO_COMMIT" HEAD ||
die "$dir: neo-go commit $NEO_GO_COMMIT was not found in git"
fi
Expand Down

0 comments on commit 09921bb

Please sign in to comment.