diff options
author | Davide Beatrici <git@davidebeatrici.dev> | 2021-02-16 11:57:12 +0300 |
---|---|---|
committer | Davide Beatrici <git@davidebeatrici.dev> | 2021-02-16 11:57:18 +0300 |
commit | 1e4932b898363990ae41435a5741b4f31ddc6b4c (patch) | |
tree | 79583f6732e3f6e7a4f2c3c37bb5142b77194659 /.ci/azure-pipelines | |
parent | 9f3685efb7e74b9a0106b087f9c5e74240b46742 (diff) |
BUILD(versioning): Implement "--format" option in mumble-version.py
The option replaces "--project" and allows to specify the desired string format:
- "full": The default. Prints version + suffix (e.g. "1.4.0~2021-02-14~g973cee211~snapshot").
- "version": Only prints the version (e.g. "1.4.0").
- "suffix": Only prints the suffix (e.g. "~2021-02-14~g973cee211~snapshot").
The main reason for implementing this new option is the suffix-only output.
It will be passed to CMake in a future commit, for better filename control.
Diffstat (limited to '.ci/azure-pipelines')
-rwxr-xr-x | .ci/azure-pipelines/build_linux.bash | 2 | ||||
-rwxr-xr-x | .ci/azure-pipelines/build_macos.bash | 2 | ||||
-rw-r--r-- | .ci/azure-pipelines/build_windows.bat | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/.ci/azure-pipelines/build_linux.bash b/.ci/azure-pipelines/build_linux.bash index 72f3dcf24..b2a2a9cc4 100755 --- a/.ci/azure-pipelines/build_linux.bash +++ b/.ci/azure-pipelines/build_linux.bash @@ -20,7 +20,7 @@ # if [[ -n "$MUMBLE_BUILD_NUMBER_TOKEN" ]]; then - VERSION=$(python "scripts/mumble-version.py" --project) + VERSION=$(python "scripts/mumble-version.py" --format version) BUILD_NUMBER=$(curl "https://mumble.info/get-build-number?commit=${BUILD_SOURCEVERSION}&version=${VERSION}&token=${MUMBLE_BUILD_NUMBER_TOKEN}") else BUILD_NUMBER=0 diff --git a/.ci/azure-pipelines/build_macos.bash b/.ci/azure-pipelines/build_macos.bash index 90fa0dedf..ba2671ade 100755 --- a/.ci/azure-pipelines/build_macos.bash +++ b/.ci/azure-pipelines/build_macos.bash @@ -31,7 +31,7 @@ # if [[ -n "$MUMBLE_BUILD_NUMBER_TOKEN" ]]; then - VERSION=$(python "scripts/mumble-version.py" --project) + VERSION=$(python "scripts/mumble-version.py" --format version) BUILD_NUMBER=$(curl "https://mumble.info/get-build-number?commit=${BUILD_SOURCEVERSION}&version=${VERSION}&token=${MUMBLE_BUILD_NUMBER_TOKEN}") else BUILD_NUMBER=0 diff --git a/.ci/azure-pipelines/build_windows.bat b/.ci/azure-pipelines/build_windows.bat index 0d128281d..62efc3356 100644 --- a/.ci/azure-pipelines/build_windows.bat +++ b/.ci/azure-pipelines/build_windows.bat @@ -37,7 +37,7 @@ :: The method we use to store a command's output into a variable: :: https://stackoverflow.com/a/6362922 -for /f "tokens=* USEBACKQ" %%g in (`python "scripts\mumble-version.py" --project`) do (set "VERSION=%%g") +for /f "tokens=* USEBACKQ" %%g in (`python "scripts\mumble-version.py" --format version`) 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) |