From 6502d3ea7c1354d9baf2374889c615d953b93b5b Mon Sep 17 00:00:00 2001 From: ldastey-dev Date: Fri, 3 Jul 2026 23:35:47 +0100 Subject: [PATCH] fix(ado-pipelines): correct counter() to compile-time expression syntax MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Build Versioning section (§13.2) used runtime-expression syntax $[counter(...)] for the pipeline run identifier. The counter() function in the name/Build.BuildNumber field is a compile-time expression and must use $(counter(...)); the $[...] form is only valid for runtime expressions in task bodies and is not evaluated when the name field is set at queue time. This correction was intended for PR #14 but was accidentally pushed to a detached branch rather than the PR, so it never merged. This lands it on main. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- standards/ado-pipelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/standards/ado-pipelines.md b/standards/ado-pipelines.md index f3ae509..60ea935 100644 --- a/standards/ado-pipelines.md +++ b/standards/ado-pipelines.md @@ -310,7 +310,7 @@ The pipeline `name:` and the resulting `Build.BuildNumber` are a **separate mech | New feature or stage added | Add new deploy stage | `1.2.4 → 1.3.0` | | Incompatible breaking change | Remove existing endpoint | `1.3.0 → 2.0.0` | -**Automated versioning.** Separate the two mechanisms. For the run identifier, prefer an automated source — `$[counter(...)]` for a monotonic build counter, or GitVersion where richer version derivation is needed — so `Build.BuildNumber` needs no manual maintenance. Reserve manual SemVer maintenance for the declared release/version variable (§13.1), where the MAJOR/MINOR/PATCH decision reflects a deliberate human judgement about the nature of the change that no counter can infer. +**Automated versioning.** Separate the two mechanisms. For the run identifier, prefer an automated source — `$(counter(...))` for a monotonic build counter, or GitVersion where richer version derivation is needed — so `Build.BuildNumber` needs no manual maintenance. Reserve manual SemVer maintenance for the declared release/version variable (§13.1), where the MAJOR/MINOR/PATCH decision reflects a deliberate human judgement about the nature of the change that no counter can infer. ### 13.3 · Version Bump Commits