mirror of
https://github.com/overte-org/overte.git
synced 2025-07-26 07:26:37 +02:00
Replace BUILD_NUMBER with OVERTE_GIT_COMMIT_SHORT cache variable to be more descriptive.
This commit is contained in:
parent
893370ddc0
commit
28c005b85c
9 changed files with 20 additions and 34 deletions
4
.github/workflows/linux_server_build.yml
vendored
4
.github/workflows/linux_server_build.yml
vendored
|
@ -203,8 +203,6 @@ jobs:
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "BUILD_NUMBER=$GIT_COMMIT_SHORT" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Configure Build Environment 3
|
- name: Configure Build Environment 3
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
@ -255,7 +253,7 @@ jobs:
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
shell: bash
|
shell: bash
|
||||||
# This syntax requires CMake 3.23
|
# This syntax requires CMake 3.23
|
||||||
run: cmake --preset conan-${BUILD_TYPE,,} -DOVERTE_RELEASE_TYPE=$OVERTE_RELEASE_TYPE -DOVERTE_RELEASE_NUMBER=$RELEASE_NUMBER $CMAKE_EXTRA
|
run: cmake --preset conan-${BUILD_TYPE,,} -DOVERTE_RELEASE_TYPE=$OVERTE_RELEASE_TYPE -DOVERTE_RELEASE_NUMBER=$RELEASE_NUMBER -DOVERTE_GIT_COMMIT_SHORT=$GIT_COMMIT_SHORT $CMAKE_EXTRA
|
||||||
|
|
||||||
- name: Build Domain Server
|
- name: Build Domain Server
|
||||||
working-directory: build
|
working-directory: build
|
||||||
|
|
15
.github/workflows/master_build.yml
vendored
15
.github/workflows/master_build.yml
vendored
|
@ -13,7 +13,6 @@ on:
|
||||||
env:
|
env:
|
||||||
APP_NAME: interface
|
APP_NAME: interface
|
||||||
BUILD_TYPE: Release
|
BUILD_TYPE: Release
|
||||||
BUILD_NUMBER: ${{ github.event.number }}_${{ github.sha }}
|
|
||||||
GIT_COMMIT: ${{ github.sha }}
|
GIT_COMMIT: ${{ github.sha }}
|
||||||
STABLE_BUILD: 0
|
STABLE_BUILD: 0
|
||||||
UPLOAD_BUCKET: overte-public
|
UPLOAD_BUCKET: overte-public
|
||||||
|
@ -51,12 +50,6 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
runs-on: ${{matrix.os}}
|
runs-on: ${{matrix.os}}
|
||||||
steps:
|
steps:
|
||||||
- name: Report Build Number
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
|
|
||||||
echo "Build number: $BUILD_NUMBER"
|
|
||||||
|
|
||||||
- name: Configure build environment 1
|
- name: Configure build environment 1
|
||||||
shell: bash
|
shell: bash
|
||||||
id: buildenv1
|
id: buildenv1
|
||||||
|
@ -116,7 +109,7 @@ jobs:
|
||||||
if [ "${{ matrix.build_type }}" = "full" ]; then
|
if [ "${{ matrix.build_type }}" = "full" ]; then
|
||||||
echo "INSTALLER=Overte-${{ github.event.number }}_${{ github.sha }}-${{ steps.buildenv1.outputs.github_sha_short }}.$INSTALLER_EXT" >> $GITHUB_ENV
|
echo "INSTALLER=Overte-${{ github.event.number }}_${{ github.sha }}-${{ steps.buildenv1.outputs.github_sha_short }}.$INSTALLER_EXT" >> $GITHUB_ENV
|
||||||
else
|
else
|
||||||
echo "INSTALLER=Overte-Interface-master$BUILD_NUMBER-${{ steps.buildenv1.outputs.github_sha_short }}.$INSTALLER_EXT" >> $GITHUB_ENV
|
echo "INSTALLER=Overte-Interface-master-${{ steps.buildenv1.outputs.github_sha_short }}.$INSTALLER_EXT" >> $GITHUB_ENV
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Clear Working Directories
|
- name: Clear Working Directories
|
||||||
|
@ -211,10 +204,10 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ matrix.os }}" =~ "Windows" ]]; then
|
if [[ "${{ matrix.os }}" =~ "Windows" ]]; then
|
||||||
# This syntax requires CMake 3.23
|
# This syntax requires CMake 3.23
|
||||||
cmake --preset conan-default -DOVERTE_RELEASE_TYPE=NIGHTLY $CMAKE_EXTRA
|
cmake --preset conan-default -DOVERTE_GIT_COMMIT_SHORT=$GIT_COMMIT_SHORT -DOVERTE_RELEASE_TYPE=NIGHTLY $CMAKE_EXTRA
|
||||||
else
|
else
|
||||||
# This syntax requires CMake 3.23
|
# This syntax requires CMake 3.23
|
||||||
cmake --preset conan-${BUILD_TYPE,,} -DOVERTE_RELEASE_TYPE=NIGHTLY $CMAKE_EXTRA
|
cmake --preset conan-${BUILD_TYPE,,} -DOVERTE_GIT_COMMIT_SHORT=$GIT_COMMIT_SHORT -DOVERTE_RELEASE_TYPE=NIGHTLY $CMAKE_EXTRA
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Build application
|
- name: Build application
|
||||||
|
@ -283,7 +276,7 @@ jobs:
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ env.INSTALLER }}
|
name: ${{ env.INSTALLER }}
|
||||||
path: build/${{ env.INSTALLER }}
|
path: build/Overte-*
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
#- name: Archive symbols
|
#- name: Archive symbols
|
||||||
|
|
4
.github/workflows/pr_build.yml
vendored
4
.github/workflows/pr_build.yml
vendored
|
@ -254,10 +254,10 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ matrix.os }}" =~ "Windows" ]]; then
|
if [[ "${{ matrix.os }}" =~ "Windows" ]]; then
|
||||||
# This syntax requires CMake 3.23
|
# This syntax requires CMake 3.23
|
||||||
cmake --preset conan-default -DOVERTE_RELEASE_NUMBER=${{ github.event.number }} -DOVERTE_RELEASE_TYPE=PR $CMAKE_EXTRA
|
cmake --preset conan-default -DOVERTE_RELEASE_NUMBER=${{ github.event.number }} -DOVERTE_GIT_COMMIT_SHORT=$GIT_COMMIT_SHORT -DOVERTE_RELEASE_TYPE=PR $CMAKE_EXTRA
|
||||||
else
|
else
|
||||||
# This syntax requires CMake 3.23
|
# This syntax requires CMake 3.23
|
||||||
cmake --preset conan-${BUILD_TYPE,,} -DOVERTE_RELEASE_NUMBER=${{ github.event.number }} -DOVERTE_RELEASE_TYPE=PR $CMAKE_EXTRA
|
cmake --preset conan-${BUILD_TYPE,,} -DOVERTE_RELEASE_NUMBER=${{ github.event.number }} -DOVERTE_GIT_COMMIT_SHORT=$GIT_COMMIT_SHORT -DOVERTE_RELEASE_TYPE=PR $CMAKE_EXTRA
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Build Application
|
- name: Build Application
|
||||||
|
|
2
.github/workflows/release_build.yml
vendored
2
.github/workflows/release_build.yml
vendored
|
@ -77,8 +77,6 @@ jobs:
|
||||||
- name: Configure build environment 2
|
- name: Configure build environment 2
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|
||||||
echo "BUILD_NUMBER=$GIT_COMMIT_SHORT" >> $GITHUB_ENV
|
|
||||||
echo "ARTIFACT_PATTERN=Overte-${{ github.ref_name }}.$INSTALLER_EXT" >> $GITHUB_ENV
|
echo "ARTIFACT_PATTERN=Overte-${{ github.ref_name }}.$INSTALLER_EXT" >> $GITHUB_ENV
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
6
BUILD.md
6
BUILD.md
|
@ -60,9 +60,6 @@ Where `/path/to/directory` is the path to a directory where you wish the build f
|
||||||
#### Possible Environment Variables
|
#### Possible Environment Variables
|
||||||
|
|
||||||
```text
|
```text
|
||||||
// The build commit, e.g., use a Git hash for the most recent commit in the branch - fd6973b.
|
|
||||||
BUILD_NUMBER
|
|
||||||
|
|
||||||
// The Interface will have a custom default home and startup location.
|
// The Interface will have a custom default home and startup location.
|
||||||
PRELOADED_STARTUP_LOCATION=Location/IP/URL
|
PRELOADED_STARTUP_LOCATION=Location/IP/URL
|
||||||
// The Interface will have a custom default script whitelist, comma separated, no spaces.
|
// The Interface will have a custom default script whitelist, comma separated, no spaces.
|
||||||
|
@ -94,6 +91,9 @@ OVERTE_BACKTRACE_TOKEN
|
||||||
// The release version, e.g., 2021.3.2. For PR builds the PR number, e.g. 577.
|
// The release version, e.g., 2021.3.2. For PR builds the PR number, e.g. 577.
|
||||||
// Not used for nightlies and development builds.
|
// Not used for nightlies and development builds.
|
||||||
OVERTE_RELEASE_NUMBER
|
OVERTE_RELEASE_NUMBER
|
||||||
|
// The build commit, e.g., use a Git hash for the most recent commit in the branch - fd6973b.
|
||||||
|
OVERTE_GIT_COMMIT_SHORT
|
||||||
|
|
||||||
// The type of release.
|
// The type of release.
|
||||||
OVERTE_RELEASE_TYPE=PRODUCTION|PR|NIGHTLY|DEV
|
OVERTE_RELEASE_TYPE=PRODUCTION|PR|NIGHTLY|DEV
|
||||||
```
|
```
|
||||||
|
|
|
@ -109,7 +109,7 @@ For code signing to work, you will need to set the `HF_PFX_FILE` and `HF_PFX_PAS
|
||||||
1. Ensure you have all the prerequisites fulfilled from the [MacOS Build Guide](BUILD_OSX.md).
|
1. Ensure you have all the prerequisites fulfilled from the [MacOS Build Guide](BUILD_OSX.md).
|
||||||
2. Perform a clean CMake in your build folder. e.g.
|
2. Perform a clean CMake in your build folder. e.g.
|
||||||
```bash
|
```bash
|
||||||
BUILD_GLOBAL_SERVICES=STABLE USE_STABLE_GLOBAL_SERVICES=1 BUILD_NUMBER="Insert Build Identifier here e.g. short hash of your last Git commit" STABLE_BUILD=1 PRODUCTION_BUILD=1 cmake -DOVERTE_RELEASE_NUMBER="Insert Release Version Here e.g. 1.1.0" -DOVERTE_RELEASE_TYPE=PRODUCTION -DCMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk" -DOVERTE_BUILD_SERVER=0 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOSX_SDK=10.12 ..
|
BUILD_GLOBAL_SERVICES=STABLE USE_STABLE_GLOBAL_SERVICES=1 STABLE_BUILD=1 PRODUCTION_BUILD=1 cmake -DOVERTE_GIT_COMMIT_SHORT="Insert short hash of your last Git commit" -DOVERTE_RELEASE_NUMBER="Insert Release Version Here e.g. 1.1.0" -DOVERTE_RELEASE_TYPE=PRODUCTION -DCMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk" -DOVERTE_BUILD_SERVER=0 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOSX_SDK=10.12 ..
|
||||||
```
|
```
|
||||||
3. Pick a method to build and package your release.
|
3. Pick a method to build and package your release.
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,8 @@ macro(SET_PACKAGING_PARAMETERS)
|
||||||
set(DEV_BUILD 0)
|
set(DEV_BUILD 0)
|
||||||
set(BUILD_GLOBAL_SERVICES "DEVELOPMENT")
|
set(BUILD_GLOBAL_SERVICES "DEVELOPMENT")
|
||||||
set(USE_STABLE_GLOBAL_SERVICES 0)
|
set(USE_STABLE_GLOBAL_SERVICES 0)
|
||||||
set(BUILD_NUMBER 0)
|
set(OVERTE_GIT_COMMIT_SHORT 0 CACHE STRING "Short Git commit hash to use for versioning.")
|
||||||
|
|
||||||
set(APP_USER_MODEL_ID "com.highfidelity.console-dev")
|
set(APP_USER_MODEL_ID "com.highfidelity.console-dev")
|
||||||
|
|
||||||
set_from_env(STABLE_BUILD STABLE_BUILD 0)
|
set_from_env(STABLE_BUILD STABLE_BUILD 0)
|
||||||
|
@ -115,16 +116,11 @@ macro(SET_PACKAGING_PARAMETERS)
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if ((PRODUCTION_BUILD OR PR_BUILD) AND NOT STABLE_BUILD)
|
set(BUILD_VERSION_NO_SHA ${BUILD_VERSION})
|
||||||
set(GIT_COMMIT_SHORT $ENV{GIT_COMMIT_SHORT})
|
if (NOT PRODUCTION_BUILD)
|
||||||
# append the abbreviated commit SHA to the build version
|
# append the abbreviated commit SHA to the build version
|
||||||
# since this is a PR build or master/nightly builds
|
# since this is a PR build or master/nightly build
|
||||||
set(BUILD_VERSION_NO_SHA ${BUILD_VERSION})
|
set(BUILD_VERSION "${BUILD_VERSION}-${OVERTE_GIT_COMMIT_SHORT}")
|
||||||
set(BUILD_VERSION "${BUILD_VERSION}-${GIT_COMMIT_SHORT}")
|
|
||||||
|
|
||||||
# pass along a release number without the SHA in case somebody
|
|
||||||
# wants to compare master or PR builds as integers
|
|
||||||
set(BUILD_NUMBER ${OVERTE_RELEASE_NUMBER})
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
// Created by Stephen Birarda on 1/14/16.
|
// Created by Stephen Birarda on 1/14/16.
|
||||||
// Copyright 2015 High Fidelity, Inc.
|
// Copyright 2015 High Fidelity, Inc.
|
||||||
// Copyright 2021 Vircadia contributors.
|
// Copyright 2021 Vircadia contributors.
|
||||||
|
// Copyright 2025 Overte e.V.
|
||||||
//
|
//
|
||||||
// Distributed under the Apache License, Version 2.0.
|
// Distributed under the Apache License, Version 2.0.
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
@ -25,7 +26,7 @@ namespace BuildInfo {
|
||||||
const QString MODIFIED_ORGANIZATION = "@BUILD_ORGANIZATION@";
|
const QString MODIFIED_ORGANIZATION = "@BUILD_ORGANIZATION@";
|
||||||
const QString ORGANIZATION_DOMAIN = "overte.org";
|
const QString ORGANIZATION_DOMAIN = "overte.org";
|
||||||
const QString VERSION = "@BUILD_VERSION@";
|
const QString VERSION = "@BUILD_VERSION@";
|
||||||
const QString BUILD_NUMBER = "@BUILD_NUMBER@";
|
const QString BUILD_NUMBER = "@BUILD_VERSION_NO_SHA@";
|
||||||
const QString BUILD_GLOBAL_SERVICES = "@BUILD_GLOBAL_SERVICES@";
|
const QString BUILD_GLOBAL_SERVICES = "@BUILD_GLOBAL_SERVICES@";
|
||||||
const QString BUILD_TIME = "@BUILD_DATE@";
|
const QString BUILD_TIME = "@BUILD_DATE@";
|
||||||
const QString PRELOADED_STARTUP_LOCATION = "@PRELOADED_STARTUP_LOCATION@";
|
const QString PRELOADED_STARTUP_LOCATION = "@PRELOADED_STARTUP_LOCATION@";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"buildNumber": "@BUILD_NUMBER@",
|
|
||||||
"releaseType": "@OVERTE_RELEASE_TYPE@",
|
"releaseType": "@OVERTE_RELEASE_TYPE@",
|
||||||
|
"buildNumber": "@OVERTE_GIT_COMMIT_SHORT@",
|
||||||
"stableBuild": "@STABLE_BUILD@",
|
"stableBuild": "@STABLE_BUILD@",
|
||||||
"buildIdentifier": "@BUILD_VERSION@",
|
"buildIdentifier": "@BUILD_VERSION@",
|
||||||
"organization": "@BUILD_ORGANIZATION@",
|
"organization": "@BUILD_ORGANIZATION@",
|
||||||
|
|
Loading…
Reference in a new issue