Skip to content

Commit 6e17949

Browse files
committed
Use path instead of longVersion
1 parent b18711d commit 6e17949

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/is-binary-up-to-date.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ function check_release_version() {
1919

2020
# Retrieve the latest released version
2121
latest_version_short=$(jq --raw-output ".latestRelease" "$LIST_FILE")
22-
latest_version_long=$(jq --raw-output ".releases | .[\"${latest_version_short}\"]" "$LIST_FILE" | sed --regexp-extended --quiet 's/^soljson-v(.*).js$/\1/p')
22+
latest_release_path=$(jq --raw-output ".releases | .[\"${latest_version_short}\"]" "$LIST_FILE")
2323

2424
# Check if current version is the latest release
25-
if [[ $current_version != "$latest_version_long" ]]; then
25+
if [[ "soljson-v${current_version}.js" != "$latest_release_path" ]]; then
2626
fail "Version is not the latest release:\n [current]: ${current_version}\n [latest]: ${latest_version_short}"
2727
fi
2828

2929
current_sha=$(shasum --binary --algorithm 256 ./soljson.js | awk '{ print $1 }')
30-
release_sha=$(jq --raw-output ".builds[] | select(.longVersion == \"${latest_version_long}\") | .sha256" "$LIST_FILE" | sed 's/^0x//')
30+
release_sha=$(jq --raw-output ".builds[] | select(.path == \"${latest_release_path}\") | .sha256" "$LIST_FILE" | sed 's/^0x//')
3131

3232
# Check if sha matches
3333
if [[ $current_sha != "$release_sha" ]]; then

0 commit comments

Comments
 (0)