Skip to content

Commit b4376d0

Browse files
authored
ci: don't create pull request if version is null (#480)
Previously a PR might be created if a value was received but it was "null". Skip those cases now.
1 parent dcb9d5a commit b4376d0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

scripts/core-download-link-update.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ NEW_VERSION=$(curl -s \
99
https://api.github.com/repos/dashpay/dash/releases/latest | \
1010
jq -r '.tag_name' | sed 's/^v//')
1111

12-
if [[ $? -ne 0 || -z "$NEW_VERSION" ]]; then
13-
echo "Error: Unexpected response when retrieving the current Dash Core version. Received: $NEW_VERSION"
14-
else
15-
# Print the extracted values (for verification)
12+
# Check if curl or jq failed, or if NEW_VERSION is null or empty
13+
if [[ $? -ne 0 || -z "$NEW_VERSION" || "$NEW_VERSION" == "null" ]]; then
14+
echo "Error: Unexpected response when retrieving the current Dash Core version. Ignoring update."
15+
else # Print the extracted values (for verification)
1616
echo "Extracted Version: $NEW_VERSION"
1717
# git checkout -b v$NEW_VERSION-links # Uncomment to use locally
1818

scripts/evo-tool-download-link-update.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ NEW_VERSION=$(curl -s \
99
https://api.github.com/repos/dashpay/dash-evo-tool/releases/latest | \
1010
jq -r '.tag_name' | sed 's/^v//')
1111

12-
if [[ $? -ne 0 || -z "$NEW_VERSION" ]]; then
12+
if [[ $? -ne 0 || -z "$NEW_VERSION" || "$NEW_VERSION" == "null" ]]; then
1313
echo "Error: Unexpected response when retrieving the current version. Received: $NEW_VERSION"
1414
else
1515
# Print the extracted values (for verification)

0 commit comments

Comments
 (0)