Skip to content

officialBuildId argument for build script #1497

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 16, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
officialBuildId argument for build script
  • Loading branch information
mthalman committed Jul 15, 2025
commit d6296c070f42eb220ee544562473e2bca295fa39
7 changes: 6 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ set -e
usage()
{
echo "Common settings:"
echo " --binaryLog Create MSBuild binary log (short: -bl)"
echo " --binaryLog Create MSBuild binary log (short: -bl)"
echo " --configuration <value> Build configuration: 'Debug' or 'Release' (short: -c)"
echo " --rid, --target-rid <value> Overrides the rid that is produced by the build. e.g. alpine.3.18-arm64, fedora.37-x64, freebsd.13-arm64, ubuntu.19.10-x64"
echo " --os, --target-os <value> Target operating system: e.g. linux, osx, freebsd. Note: this is the base OS name, not the distro"
echo " --arch, --target-arch <value> Target architecture: e.g. x64, x86, arm64, arm, riscv64"
echo " --branding <preview|rtm|default> Specify versioning for shipping packages/assets. 'preview' will produce assets suffixed with '.final', 'rtm' will not contain a pre-release suffix. Default or unspecified will use VMR repo defaults."
echo " --verbosity <value> Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)"
echo " --with-system-libs <libs> Use system versions of these libraries. Combine with a plus. eg brotli+libunwind+rapidjson+zlib"
echo " --official-build-id <YYYYMMDD.X> Official build ID to use for the build. This is used to set the OfficialBuildId MSBuild property."
echo ""

echo "Actions:"
Expand Down Expand Up @@ -141,6 +142,10 @@ while [[ $# > 0 ]]; do
properties+=( "/p:UseSystemLibs=$2" )
shift
;;
-official-build-id)
properties+=( "/p:OfficialBuildId=$2" )
shift
;;
-verbosity|-v)
verbosity=$2
shift
Expand Down
15 changes: 9 additions & 6 deletions eng/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Param(
[string][Alias('v')]$verbosity = "minimal",
[Parameter()][ValidateSet("preview", "rtm", "default")]
[string]$branding = "default",
[string][Alias('obid')]$officialBuildId,

# Actions
[switch]$clean,
Expand All @@ -31,13 +32,14 @@ Param(

function Get-Usage() {
Write-Host "Common settings:"
Write-Host " -binaryLog Output binary log (short: -bl)"
Write-Host " -configuration <value> Build configuration: 'Debug' or 'Release' (short: -c). [Default: Release]"
Write-Host " -rid, -targetRid <value> Overrides the rid that is produced by the build. e.g. win-arm64, win-x64"
Write-Host " -os, -targetOS <value> Target operating system: e.g. windows."
Write-Host " -arch, -targetArch <value> Target architecture: e.g. x64, x86, arm64, arm, riscv64"
Write-Host " -verbosity <value> Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)"
Write-Host " -binaryLog Output binary log (short: -bl)"
Write-Host " -configuration <value> Build configuration: 'Debug' or 'Release' (short: -c). [Default: Release]"
Write-Host " -rid, -targetRid <value> Overrides the rid that is produced by the build. e.g. win-arm64, win-x64"
Write-Host " -os, -targetOS <value> Target operating system: e.g. windows."
Write-Host " -arch, -targetArch <value> Target architecture: e.g. x64, x86, arm64, arm, riscv64"
Write-Host " -verbosity <value> Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)"
Write-Host " -branding <preview|rtm|default> Specify versioning for shipping packages/assets. 'preview' will produce assets suffixed with '.final', 'rtm' will not contain a pre-release suffix. Default or unspecified will use VMR repo defaults."
Write-Host " -officialBuildId <YYYYMMDD.X> Official build ID to use for the build. This is used to set the OfficialBuildId MSBuild property."
Write-Host ""

Write-Host "Actions:"
Expand Down Expand Up @@ -95,6 +97,7 @@ if ($branding) {
"default" { $arguments += "" }
}
}
if ($officialBuildId) { $arguments += "/p:OfficialBuildId=$officialBuildId" }

function Build {
$toolsetBuildProj = InitializeToolset
Expand Down
12 changes: 11 additions & 1 deletion eng/pipelines/templates/jobs/vmr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,18 @@ jobs:
- name: brandingArgument
value: $(commandPrefix)branding $(brandingType)

- ${{ if and(eq(variables['System.TeamProject'], 'internal'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- name: officialBuildArgument
${{ if eq(parameters.targetOS, 'windows') }}:
value: $(commandPrefix)officialBuildId $(Build.BuildNumber)
${{ else }}:
value: $(commandPrefix)official-build-id $(Build.BuildNumber)
- ${{ else }}:
- name: officialBuildArgument
value: ''

- name: baseArguments
value: $(commandPrefix)ci $(cleanArgument) $(commandPrefix)prepareMachine -c ${{ parameters.configuration }} $(brandingArgument)
value: $(commandPrefix)ci $(cleanArgument) $(commandPrefix)prepareMachine -c ${{ parameters.configuration }} $(brandingArgument) $(officialBuildArgument)

- name: baseProperties
value: $(officialBuildProperties) /p:VerticalName=$(Agent.JobName)
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/templates/variables/vmr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ variables:

- ${{ if eq(variables['isOfficialBuild'], true) }}:
- name: officialBuildProperties
value: '/p:OfficialBuildId=$(Build.BuildNumber) $(officialBuilderProperty)'
value: '$(officialBuilderProperty)'
- ${{ else }}:
- name: officialBuildProperties
value: ''
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy