From 2969237e04ac3a17ad1e9aac3d59312b89fb7ebc Mon Sep 17 00:00:00 2001 From: Davide Beatrici Date: Sat, 20 Feb 2021 17:23:53 +0100 Subject: [PATCH 1/2] Azure Pipelines: Use "python3" instead of "python" on macOS 63b841efc01897bb26b5bb969306e9bf33c37823 was not the solution, the error is the print statement itself. Python 2 is probably used by default and thus "python" is an alias to it. --- .ci/azure-pipelines/macos_build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/azure-pipelines/macos_build.sh b/.ci/azure-pipelines/macos_build.sh index 5befaebc..a7418e74 100755 --- a/.ci/azure-pipelines/macos_build.sh +++ b/.ci/azure-pipelines/macos_build.sh @@ -1,7 +1,7 @@ #!/bin/bash if [[ "${#SE_BUILD_NUMBER_TOKEN}" -eq 64 ]]; then - VERSION=$(python "version.py") + VERSION=$(python3 "version.py") BUILD_NUMBER=$(curl "https://softether.network/get-build-number?commit=${BUILD_SOURCEVERSION}&version=${VERSION}&token=${SE_BUILD_NUMBER_TOKEN}") else BUILD_NUMBER=0 From cabcba1ef98a12a30a7b1ef241ff0f03c89bbbc6 Mon Sep 17 00:00:00 2001 From: Davide Beatrici Date: Sat, 20 Feb 2021 17:27:02 +0100 Subject: [PATCH 2/2] Revert "version.py: Fix CI failure on macOS by avoiding inline if statement" This reverts commit 63b841efc01897bb26b5bb969306e9bf33c37823. --- version.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/version.py b/version.py index 4d02c2cf..6ccacd27 100644 --- a/version.py +++ b/version.py @@ -5,10 +5,7 @@ def main(): parser.add_argument('-n', '--newline', action = 'store_true', help = 'Break line after printing version') args = parser.parse_args() - if args.newline: - end = None - else: - end = '' + end = None if args.newline else '' version = None with open('CMakeLists.txt', 'r') as file: