Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Adam <dev@robert-adam.de>2022-01-09 20:49:45 +0300
committerRobert Adam <dev@robert-adam.de>2022-08-12 21:51:55 +0300
commit4cd0f905c0b798c260137dbaadaa80d3327e028d (patch)
tree54426eb1a59b790f4518413f073e223904040dbe
parent31c87071d40140d09bc62f0788da2ccea069e695 (diff)
CI: Use new build-number script
(cherry picked from commit bec87be1e4a1ab45aedde2b7294ebb866dc86dd8)
-rwxr-xr-x.ci/azure-pipelines/build_linux.bash9
-rwxr-xr-x.ci/azure-pipelines/build_macos.bash9
-rw-r--r--.ci/build_windows.bat11
3 files changed, 8 insertions, 21 deletions
diff --git a/.ci/azure-pipelines/build_linux.bash b/.ci/azure-pipelines/build_linux.bash
index 7116c30ce..d3bf7c9d5 100755
--- a/.ci/azure-pipelines/build_linux.bash
+++ b/.ci/azure-pipelines/build_linux.bash
@@ -19,12 +19,9 @@
# MUMBLE_BUILD_NUMBER_TOKEN - Access token for the build number page on our server.
#
-if [[ -n "$MUMBLE_BUILD_NUMBER_TOKEN" ]]; then
- VERSION=$(python "scripts/mumble-version.py")
- BUILD_NUMBER=$(curl "https://mumble.info/get-build-number?commit=${BUILD_SOURCEVERSION}&version=${VERSION}&token=${MUMBLE_BUILD_NUMBER_TOKEN}")
-else
- BUILD_NUMBER=0
-fi
+VERSION=$("./scripts/mumble-version.py")
+BUILD_NUMBER=$("./scripts/mumble-build-number.py" --commit "${BUILD_SOURCEVERSION}" --version "${VERSION}" \
+ --password "${MUMBLE_BUILD_NUMBER_TOKEN}" --default 0)
cd $BUILD_BINARIESDIRECTORY
diff --git a/.ci/azure-pipelines/build_macos.bash b/.ci/azure-pipelines/build_macos.bash
index 04e636f18..4578e4a58 100755
--- a/.ci/azure-pipelines/build_macos.bash
+++ b/.ci/azure-pipelines/build_macos.bash
@@ -30,12 +30,9 @@
# MUMBLE_BUILD_NUMBER_TOKEN - Access token for the build number page on our server.
#
-if [[ -n "$MUMBLE_BUILD_NUMBER_TOKEN" ]]; then
- VERSION=$(python "scripts/mumble-version.py")
- BUILD_NUMBER=$(curl "https://mumble.info/get-build-number?commit=${BUILD_SOURCEVERSION}&version=${VERSION}&token=${MUMBLE_BUILD_NUMBER_TOKEN}")
-else
- BUILD_NUMBER=0
-fi
+VERSION=$("./scripts/mumble-version.py")
+BUILD_NUMBER=$("./scripts/mumble-build-number.py" --commit "${BUILD_SOURCEVERSION}" --version "${VERSION}" \
+ --password "${MUMBLE_BUILD_NUMBER_TOKEN}" --default 0)
cd $BUILD_BINARIESDIRECTORY
diff --git a/.ci/build_windows.bat b/.ci/build_windows.bat
index cd32b4b33..332ab0582 100644
--- a/.ci/build_windows.bat
+++ b/.ci/build_windows.bat
@@ -28,15 +28,8 @@
:: https://stackoverflow.com/a/6362922
for /f "tokens=* USEBACKQ" %%g in (`python "scripts\mumble-version.py"`) do (set "VERSION=%%g")
-:: For some really stupid reason we can't have this statement and the one where we set the VERSION variable in the same if body as
-:: in that case the variable substitution of that variable in the expression below fails (is replaced with empty string)
-:: Also we can't anything else inside the if body as this will cause the curl command to always be executed.
-if defined MUMBLE_BUILD_NUMBER_TOKEN (
- for /f "tokens=* USEBACKQ" %%g in (`curl "https://mumble.info/get-build-number?commit=%MUMBLE_SOURCE_COMMIT%&version=%VERSION%&token=%MUMBLE_BUILD_NUMBER_TOKEN%"`) do (set "BUILD_NUMBER=%%g")
-) else (
- echo Build number token not set - defaulting to 0
- set BUILD_NUMBER=0
-)
+for /f "tokens=* USEBACKQ" %%g in (`python "scripts\mumble-build-number.py" --commit "%MUMBLE_SOURCE_COMMIT%" --version "%VERSION%" ^
+ --password "%MUMBLE_BUILD_NUMBER_TOKEN%" --default 0`) do (set "BUILD_NUMBER=%%g")
:: Create build directory if it doesn't exist.
if not exist "%MUMBLE_BUILD_DIRECTORY%" mkdir "%MUMBLE_BUILD_DIRECTORY%