From 8adab003b7f0e1c9ec4b2b04330e630ab0f1eec8 Mon Sep 17 00:00:00 2001 From: Michal Dengusiak Date: Fri, 15 May 2026 16:27:16 +0200 Subject: [PATCH 1/8] Replace Newtonsoft.Json with System.Text.Json (10.0.8) SAM-BIM core migrated from Newtonsoft.Json to System.Text.Json.Nodes. SAM.Core's public surface now exposes JsonObject; replace each csproj's Newtonsoft package reference with System.Text.Json 10.0.8 so downstream consumers can resolve the type at compile time. Co-Authored-By: Claude Opus 4.7 --- .../SAM.Analytical.Grasshopper.Topologic.csproj | 4 +--- .../SAM.Core.Grasshopper.Topologic.csproj | 4 +--- .../SAM.Geometry.Grasshopper.Topologic.csproj | 4 +--- .../SAM.Analytical.Topologic/SAM.Analytical.Topologic.csproj | 2 +- SAM_Topologic/SAM.Core.Topologic/SAM.Core.Topologic.csproj | 2 +- .../SAM.Geometry.Topologic/SAM.Geometry.Topologic.csproj | 2 +- 6 files changed, 6 insertions(+), 12 deletions(-) diff --git a/Grasshopper/SAM.Analytical.Grasshopper.Topologic/SAM.Analytical.Grasshopper.Topologic.csproj b/Grasshopper/SAM.Analytical.Grasshopper.Topologic/SAM.Analytical.Grasshopper.Topologic.csproj index 1adb99b..0b42871 100644 --- a/Grasshopper/SAM.Analytical.Grasshopper.Topologic/SAM.Analytical.Grasshopper.Topologic.csproj +++ b/Grasshopper/SAM.Analytical.Grasshopper.Topologic/SAM.Analytical.Grasshopper.Topologic.csproj @@ -70,9 +70,7 @@ 8.21.25188.17001 runtime - - 13.0.3 - + diff --git a/Grasshopper/SAM.Core.Grasshopper.Topologic/SAM.Core.Grasshopper.Topologic.csproj b/Grasshopper/SAM.Core.Grasshopper.Topologic/SAM.Core.Grasshopper.Topologic.csproj index 5782f21..7e103e1 100644 --- a/Grasshopper/SAM.Core.Grasshopper.Topologic/SAM.Core.Grasshopper.Topologic.csproj +++ b/Grasshopper/SAM.Core.Grasshopper.Topologic/SAM.Core.Grasshopper.Topologic.csproj @@ -51,9 +51,7 @@ runtime - - 13.0.3 - + diff --git a/Grasshopper/SAM.Geometry.Grasshopper.Topologic/SAM.Geometry.Grasshopper.Topologic.csproj b/Grasshopper/SAM.Geometry.Grasshopper.Topologic/SAM.Geometry.Grasshopper.Topologic.csproj index 7f65815..6e0e97e 100644 --- a/Grasshopper/SAM.Geometry.Grasshopper.Topologic/SAM.Geometry.Grasshopper.Topologic.csproj +++ b/Grasshopper/SAM.Geometry.Grasshopper.Topologic/SAM.Geometry.Grasshopper.Topologic.csproj @@ -58,9 +58,7 @@ 8.21.25188.17001 runtime - - 13.0.3 - + diff --git a/SAM_Topologic/SAM.Analytical.Topologic/SAM.Analytical.Topologic.csproj b/SAM_Topologic/SAM.Analytical.Topologic/SAM.Analytical.Topologic.csproj index b7d7db6..67201f0 100644 --- a/SAM_Topologic/SAM.Analytical.Topologic/SAM.Analytical.Topologic.csproj +++ b/SAM_Topologic/SAM.Analytical.Topologic/SAM.Analytical.Topologic.csproj @@ -49,7 +49,7 @@ - + Copy /Y "$(SolutionDir)references\TopologicCore.dll" "$(SolutionDir)build\TopologicCore.dll" diff --git a/SAM_Topologic/SAM.Core.Topologic/SAM.Core.Topologic.csproj b/SAM_Topologic/SAM.Core.Topologic/SAM.Core.Topologic.csproj index 52334f4..adde47f 100644 --- a/SAM_Topologic/SAM.Core.Topologic/SAM.Core.Topologic.csproj +++ b/SAM_Topologic/SAM.Core.Topologic/SAM.Core.Topologic.csproj @@ -33,7 +33,7 @@ - + Copy /Y "$(SolutionDir)references\TopologicCore.dll" "$(SolutionDir)build\TopologicCore.dll" diff --git a/SAM_Topologic/SAM.Geometry.Topologic/SAM.Geometry.Topologic.csproj b/SAM_Topologic/SAM.Geometry.Topologic/SAM.Geometry.Topologic.csproj index 200ef4e..1f53a8b 100644 --- a/SAM_Topologic/SAM.Geometry.Topologic/SAM.Geometry.Topologic.csproj +++ b/SAM_Topologic/SAM.Geometry.Topologic/SAM.Geometry.Topologic.csproj @@ -28,7 +28,7 @@ - + Copy /Y "$(SolutionDir)references\TopologicCore.dll" "$(SolutionDir)build\TopologicCore.dll" From b25a126cb7af7c3b64ccb86086f2eec42e30ee27 Mon Sep 17 00:00:00 2001 From: Michal Dengusiak Date: Fri, 15 May 2026 22:01:52 +0200 Subject: [PATCH 2/8] CI: prefer sow/2026-Q2 for dep clones + trigger on it During the SAM-BIM Newtonsoft.Json -> System.Text.Json migration the quarterly sow/2026-Q2 branch carries the binary-breaking change. CI needs to consume the migrated SAM (and any sibling dep) from sow/2026-Q2, not from master, until the quarter-end merge. - Add "sow/2026-Q2" to push/pull_request branch triggers - For each dep clone, ls-remote sow/2026-Q2 and prefer it when present; fall back to default branch (e.g. master) otherwise. After the quarter merges back to master, this fallback naturally restores prior behaviour. Co-Authored-By: Claude Opus 4.7 --- .github/workflows/build.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 15029cd..f514dbb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,9 +2,9 @@ name: Build (Windows) on: push: - branches: [ "master", "main" ] + branches: [ "master", "main", "sow/2026-Q2" ] pull_request: - branches: [ "master", "main" ] + branches: [ "master", "main", "sow/2026-Q2" ] workflow_dispatch: jobs: @@ -55,8 +55,15 @@ jobs: $deps = $buildOrder[0..($buildOrder.Count-2)] foreach ($r in $deps) { if (Test-Path $r) { continue } - Write-Host "Cloning https://github.com/$org/$r.git" - git clone --depth 1 "https://github.com/$org/$r.git" $r + $preferredBranch = 'sow/2026-Q2' + $hasPreferred = (git ls-remote --heads "https://github.com/$org/$r.git" $preferredBranch 2>$null | Out-String).Trim() + if ($hasPreferred) { + Write-Host "Cloning $org/$r @ $preferredBranch" + git clone --depth 1 --branch $preferredBranch "https://github.com/$org/$r.git" $r + } else { + Write-Host "Cloning $org/$r @ default branch" + git clone --depth 1 "https://github.com/$org/$r.git" $r + } } # Ensure ReferencePath exists even before SAM_Windows builds From 1f0a5d8697b7eb53c8c7fcdac61093acc1b402d6 Mon Sep 17 00:00:00 2001 From: Michal Dengusiak Date: Fri, 15 May 2026 22:06:24 +0200 Subject: [PATCH 3/8] CI: cascade dep clones to PR head_ref -> sow/2026-Q2 -> default Refines the previous workflow patch so CI on the migration PR can succeed before anything has been merged. Each dep repo is cloned from: 1. github.head_ref (feature/remove-newtonsoft on these PRs) - has the migration right now on every dep 2. sow/2026-Q2 - source of truth after these PRs merge 3. default branch - source of truth after quarter-end merge Co-Authored-By: Claude Opus 4.7 --- .github/workflows/build.yml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f514dbb..f4dc414 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,17 +55,27 @@ jobs: $deps = $buildOrder[0..($buildOrder.Count-2)] foreach ($r in $deps) { if (Test-Path $r) { continue } - $preferredBranch = 'sow/2026-Q2' - $hasPreferred = (git ls-remote --heads "https://github.com/$org/$r.git" $preferredBranch 2>$null | Out-String).Trim() - if ($hasPreferred) { - Write-Host "Cloning $org/$r @ $preferredBranch" - git clone --depth 1 --branch $preferredBranch "https://github.com/$org/$r.git" $r - } else { + $headRef = '${{ github.head_ref }}' + $candidates = @() + if ($headRef) { $candidates += $headRef } + $candidates += 'sow/2026-Q2' + $cloned = $false + foreach ($cand in $candidates) { + $has = (git ls-remote --heads "https://github.com/$org/$r.git" $cand 2>$null | Out-String).Trim() + if ($has) { + Write-Host "Cloning $org/$r @ $cand" + git clone --depth 1 --branch $cand "https://github.com/$org/$r.git" $r + $cloned = $true + break + } + } + if (-not $cloned) { Write-Host "Cloning $org/$r @ default branch" git clone --depth 1 "https://github.com/$org/$r.git" $r } } + # Ensure ReferencePath exists even before SAM_Windows builds New-Item -ItemType Directory -Force -Path "SAM_Windows\build" | Out-Null From f78fb71d2d2a9da4cd611827c3ae057979fa63c8 Mon Sep 17 00:00:00 2001 From: Michal Dengusiak Date: Wed, 20 May 2026 09:59:43 +0200 Subject: [PATCH 4/8] Pin System.Text.Json to 8.0.5 Aligns the repo with the SAM-BIM workspace-wide pin to the LTS-aligned System.Text.Json 8.0.5, replacing the previously pinned 10.0.8 preview. --- .../SAM.Analytical.Grasshopper.Topologic.csproj | 2 +- .../SAM.Core.Grasshopper.Topologic.csproj | 2 +- .../SAM.Geometry.Grasshopper.Topologic.csproj | 2 +- .../SAM.Analytical.Topologic/SAM.Analytical.Topologic.csproj | 2 +- SAM_Topologic/SAM.Core.Topologic/SAM.Core.Topologic.csproj | 2 +- .../SAM.Geometry.Topologic/SAM.Geometry.Topologic.csproj | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Grasshopper/SAM.Analytical.Grasshopper.Topologic/SAM.Analytical.Grasshopper.Topologic.csproj b/Grasshopper/SAM.Analytical.Grasshopper.Topologic/SAM.Analytical.Grasshopper.Topologic.csproj index 0b42871..264d016 100644 --- a/Grasshopper/SAM.Analytical.Grasshopper.Topologic/SAM.Analytical.Grasshopper.Topologic.csproj +++ b/Grasshopper/SAM.Analytical.Grasshopper.Topologic/SAM.Analytical.Grasshopper.Topologic.csproj @@ -70,7 +70,7 @@ 8.21.25188.17001 runtime - + diff --git a/Grasshopper/SAM.Core.Grasshopper.Topologic/SAM.Core.Grasshopper.Topologic.csproj b/Grasshopper/SAM.Core.Grasshopper.Topologic/SAM.Core.Grasshopper.Topologic.csproj index 7e103e1..83e4cda 100644 --- a/Grasshopper/SAM.Core.Grasshopper.Topologic/SAM.Core.Grasshopper.Topologic.csproj +++ b/Grasshopper/SAM.Core.Grasshopper.Topologic/SAM.Core.Grasshopper.Topologic.csproj @@ -51,7 +51,7 @@ runtime - + diff --git a/Grasshopper/SAM.Geometry.Grasshopper.Topologic/SAM.Geometry.Grasshopper.Topologic.csproj b/Grasshopper/SAM.Geometry.Grasshopper.Topologic/SAM.Geometry.Grasshopper.Topologic.csproj index 6e0e97e..8cde6cd 100644 --- a/Grasshopper/SAM.Geometry.Grasshopper.Topologic/SAM.Geometry.Grasshopper.Topologic.csproj +++ b/Grasshopper/SAM.Geometry.Grasshopper.Topologic/SAM.Geometry.Grasshopper.Topologic.csproj @@ -58,7 +58,7 @@ 8.21.25188.17001 runtime - + diff --git a/SAM_Topologic/SAM.Analytical.Topologic/SAM.Analytical.Topologic.csproj b/SAM_Topologic/SAM.Analytical.Topologic/SAM.Analytical.Topologic.csproj index 67201f0..372741e 100644 --- a/SAM_Topologic/SAM.Analytical.Topologic/SAM.Analytical.Topologic.csproj +++ b/SAM_Topologic/SAM.Analytical.Topologic/SAM.Analytical.Topologic.csproj @@ -49,7 +49,7 @@ - + Copy /Y "$(SolutionDir)references\TopologicCore.dll" "$(SolutionDir)build\TopologicCore.dll" diff --git a/SAM_Topologic/SAM.Core.Topologic/SAM.Core.Topologic.csproj b/SAM_Topologic/SAM.Core.Topologic/SAM.Core.Topologic.csproj index adde47f..a678822 100644 --- a/SAM_Topologic/SAM.Core.Topologic/SAM.Core.Topologic.csproj +++ b/SAM_Topologic/SAM.Core.Topologic/SAM.Core.Topologic.csproj @@ -33,7 +33,7 @@ - + Copy /Y "$(SolutionDir)references\TopologicCore.dll" "$(SolutionDir)build\TopologicCore.dll" diff --git a/SAM_Topologic/SAM.Geometry.Topologic/SAM.Geometry.Topologic.csproj b/SAM_Topologic/SAM.Geometry.Topologic/SAM.Geometry.Topologic.csproj index 1f53a8b..44756a3 100644 --- a/SAM_Topologic/SAM.Geometry.Topologic/SAM.Geometry.Topologic.csproj +++ b/SAM_Topologic/SAM.Geometry.Topologic/SAM.Geometry.Topologic.csproj @@ -28,7 +28,7 @@ - + Copy /Y "$(SolutionDir)references\TopologicCore.dll" "$(SolutionDir)build\TopologicCore.dll" From 4802a212349fe28b4f1220f86cd2e64d67744cdd Mon Sep 17 00:00:00 2001 From: Michal Dengusiak Date: Wed, 20 May 2026 13:37:57 +0200 Subject: [PATCH 5/8] fix: pin AssemblyVersion/FileVersion to 1.0.0.0 (#3) * fix: pin AssemblyVersion/FileVersion to 1.0.0.0 (drop 1.0.* wildcard) Eliminates CS1607 warnings and restores deterministic builds. Aligns with the workspace's existing fixed-version files. Scope: AssemblyInfo.cs + .csproj version attributes only. The // commented-out template example is left intact for documentation. * fix: add SPDX + copyright header to modified AssemblyInfo.cs and refresh .csproj Satisfies the spdx-check workflow which requires every changed .cs file to declare the LGPL-3.0-or-later SPDX identifier and the 2020-2026 attribution in its first 20 lines. Also updates the stale 'Copyright (c) 2020' line in .csproj files to match the SPDX header style. --- .../Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- SAM_Topologic/SAM.Core.Topologic/SAM.Core.Topologic.csproj | 6 +++--- .../SAM.Geometry.Topologic/SAM.Geometry.Topologic.csproj | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Grasshopper/SAM.Analytical.Grasshopper.Topologic/Properties/AssemblyInfo.cs b/Grasshopper/SAM.Analytical.Grasshopper.Topologic/Properties/AssemblyInfo.cs index d2c0151..46ad553 100644 --- a/Grasshopper/SAM.Analytical.Grasshopper.Topologic/Properties/AssemblyInfo.cs +++ b/Grasshopper/SAM.Analytical.Grasshopper.Topologic/Properties/AssemblyInfo.cs @@ -56,5 +56,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Grasshopper/SAM.Core.Grasshopper.Topologic/Properties/AssemblyInfo.cs b/Grasshopper/SAM.Core.Grasshopper.Topologic/Properties/AssemblyInfo.cs index 08fb1d4..4f57f7d 100644 --- a/Grasshopper/SAM.Core.Grasshopper.Topologic/Properties/AssemblyInfo.cs +++ b/Grasshopper/SAM.Core.Grasshopper.Topologic/Properties/AssemblyInfo.cs @@ -56,5 +56,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Grasshopper/SAM.Geometry.Grasshopper.Topologic/Properties/AssemblyInfo.cs b/Grasshopper/SAM.Geometry.Grasshopper.Topologic/Properties/AssemblyInfo.cs index bcdd67f..0a033b1 100644 --- a/Grasshopper/SAM.Geometry.Grasshopper.Topologic/Properties/AssemblyInfo.cs +++ b/Grasshopper/SAM.Geometry.Grasshopper.Topologic/Properties/AssemblyInfo.cs @@ -56,5 +56,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/SAM_Topologic/SAM.Core.Topologic/SAM.Core.Topologic.csproj b/SAM_Topologic/SAM.Core.Topologic/SAM.Core.Topologic.csproj index a678822..2dfc901 100644 --- a/SAM_Topologic/SAM.Core.Topologic/SAM.Core.Topologic.csproj +++ b/SAM_Topologic/SAM.Core.Topologic/SAM.Core.Topologic.csproj @@ -41,8 +41,8 @@ Copy /Y "$(SolutionDir)references\TK*.dll" "$(SolutionDir)build\TK*.dll" Copy /Y "$(SolutionDir)references\tbb*.dll" "$(SolutionDir)build\tbb*.dll" SAM_Topologic SAM_Topologic - Copyright © 2020 - 1.0.%2a - 1.0.%2a + Copyright (c) 2020-2026 Michal Dengusiak & Jakub Ziolkowski and contributors + 1.0.0.0 + 1.0.0.0 \ No newline at end of file diff --git a/SAM_Topologic/SAM.Geometry.Topologic/SAM.Geometry.Topologic.csproj b/SAM_Topologic/SAM.Geometry.Topologic/SAM.Geometry.Topologic.csproj index 44756a3..a69d574 100644 --- a/SAM_Topologic/SAM.Geometry.Topologic/SAM.Geometry.Topologic.csproj +++ b/SAM_Topologic/SAM.Geometry.Topologic/SAM.Geometry.Topologic.csproj @@ -35,8 +35,8 @@ Copy /Y "$(SolutionDir)references\TK*.dll" "$(SolutionDir)build\TK*.dll" SAM_Topologic SAM_Topologic - Copyright © 2020 - 1.0.%2a - 1.0.%2a + Copyright (c) 2020-2026 Michal Dengusiak & Jakub Ziolkowski and contributors + 1.0.0.0 + 1.0.0.0 \ No newline at end of file From d9bdc65d435cd8c1048c3eb65934559d3fbf8c11 Mon Sep 17 00:00:00 2001 From: Michal Dengusiak Date: Wed, 20 May 2026 21:12:18 +0200 Subject: [PATCH 6/8] build: Directory.Build.props for centralised SAMVersion stamping (#4) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * build: Directory.Build.props for centralised SAMVersion stamping Mirrors SAM-BIM/SAM#7. Stage 2 of the AssemblyVersion versioning migration. * fix: replace literal u{2013} escape with actual en-dash in SPDX header PowerShell 5.1 doesn't support backtick-u escape sequences; the apply-stage2.ps1 script leaked them as literal text in 'Copyright (c) 2020u{2013}2026'. * fix: relax SAMVersion.g.cs Target condition to != 'true' Codex P1 on SAM_LadybugTools#4: classic (non-SDK) csprojs don't set GenerateAssemblyInfo at all, so the previous '== false' condition skipped them. Switching to '!= true' catches both GenerateAssemblyInfo=false (SDK projects with legacy AssemblyInfo.cs) AND empty (classic projects). * ci: Codex P2 fixes — four-part SAMVersion, prefer head_ref for sow PRs - Append .0 so SAMVersion is 4-part (AssemblyFileVersion expects 4 parts). - Prefer github.head_ref when it matches sow/yyyy-Qx (release-promotion PRs). - Mirrors SAM sow/2026-Q2 6d87d98e. --- .github/workflows/build.yml | 40 ++++++++++++++++++- Directory.Build.props | 39 ++++++++++++++++++ .../Kernel/AssemblyInfo.cs | 5 ++- .../Properties/AssemblyInfo.cs | 3 -- ...AM.Analytical.Grasshopper.Topologic.csproj | 1 - .../Kernel/AssemblyInfo.cs | 5 ++- .../Properties/AssemblyInfo.cs | 3 -- .../SAM.Core.Grasshopper.Topologic.csproj | 1 - .../Kernel/AssemblyInfo.cs | 5 ++- .../Properties/AssemblyInfo.cs | 3 -- .../SAM.Geometry.Grasshopper.Topologic.csproj | 1 - .../Properties/AssemblyInfo.cs | 5 ++- .../SAM.Analytical.Topologic.csproj | 3 -- .../Properties/AssemblyInfo.cs | 5 ++- .../SAM.Core.Topologic.csproj | 3 -- .../Properties/AssemblyInfo.cs | 5 ++- .../SAM.Geometry.Topologic.csproj | 3 -- 17 files changed, 101 insertions(+), 29 deletions(-) create mode 100644 Directory.Build.props diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f4dc414..a73dbee 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,9 +2,9 @@ name: Build (Windows) on: push: - branches: [ "master", "main", "sow/2026-Q2" ] + branches: [ "master", "main", "sow/**" ] pull_request: - branches: [ "master", "main", "sow/2026-Q2" ] + branches: [ "master", "main", "sow/**" ] workflow_dispatch: jobs: @@ -35,6 +35,36 @@ jobs: - name: Setup MSBuild uses: microsoft/setup-msbuild@v2 + - name: Compute SAMVersion + id: ver + shell: pwsh + run: | + $ErrorActionPreference = 'Stop' + # Prefer head_ref when its a sow branch (release-promotion PRs from sow/* to main), + # else use base_ref on PR events / ref_name on push events. + $headRef = '${{ github.head_ref }}' + $baseRef = '${{ github.base_ref }}' + $refName = '${{ github.ref_name }}' + if ($headRef -match '^sow/\d{4}-Q\d$') { + $ref = $headRef + } elseif ('${{ github.event_name }}' -eq 'pull_request') { + $ref = $baseRef + } else { + $ref = $refName + } + # .NET AssemblyVersion components are UInt16 (max 65535). Cap to 60000 for headroom. + $run = ${{ github.run_number }} % 60000 + if ($ref -match 'sow/(\d{4})-Q(\d)') { + $v = "$($Matches[1]).$($Matches[2]).$run.0" + $src = "branch '$ref'" + } else { + $now = (Get-Date).ToUniversalTime() + $quarter = [int][Math]::Ceiling($now.Month / 3.0) + $v = "$($now.Year).$quarter.$run.0" + $src = "date $($now.ToString('yyyy-MM-dd')) (ref '$ref' not sow/yyyy-Qx)" + } + Write-Host "SAMVersion = $v (from $src)" + "samversion=$v" | Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8 - name: Clone dependency repos (siblings) shell: pwsh @@ -56,8 +86,13 @@ jobs: foreach ($r in $deps) { if (Test-Path $r) { continue } $headRef = '${{ github.head_ref }}' + $baseRef = '${{ github.base_ref }}' + $refName = '${{ github.ref_name }}' $candidates = @() if ($headRef) { $candidates += $headRef } + # Current sow branch: base_ref on PR events, ref_name on push events. + $sowRef = if ($baseRef -match '^sow/') { $baseRef } elseif ($refName -match '^sow/') { $refName } else { '' } + if ($sowRef -and $sowRef -ne $headRef) { $candidates += $sowRef } $candidates += 'sow/2026-Q2' $cloned = $false foreach ($cand in $candidates) { @@ -94,6 +129,7 @@ jobs: '/v:m' '/p:Configuration=Release' '/p:UseSharedCompilation=false' + '/p:SAMVersion=${{ steps.ver.outputs.samversion }}' '/p:RunPostBuildEvent=OnOutputUpdated' "/p:ReferencePath=$windowsRef" ) diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 0000000..9841655 --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,39 @@ + + + + + 1.0.0.0 + $(SAMVersion) + $(SAMVersion) + true + + + + + + <_SAMVersionLine Include="// <auto-generated />" /> + <_SAMVersionLine Include="[assembly: System.Reflection.AssemblyVersionAttribute("$(SAMVersion)")]" /> + <_SAMVersionLine Include="[assembly: System.Reflection.AssemblyFileVersionAttribute("$(SAMVersion)")]" /> + + + + + + + + + + diff --git a/Grasshopper/SAM.Analytical.Grasshopper.Topologic/Kernel/AssemblyInfo.cs b/Grasshopper/SAM.Analytical.Grasshopper.Topologic/Kernel/AssemblyInfo.cs index ea0a9dc..12667d7 100644 --- a/Grasshopper/SAM.Analytical.Grasshopper.Topologic/Kernel/AssemblyInfo.cs +++ b/Grasshopper/SAM.Analytical.Grasshopper.Topologic/Kernel/AssemblyInfo.cs @@ -1,4 +1,7 @@ -using Grasshopper.Kernel; +// SPDX-License-Identifier: LGPL-3.0-or-later +// Copyright (c) 2020–2026 Michal Dengusiak & Jakub Ziolkowski and contributors + +using Grasshopper.Kernel; using System; using System.Drawing; diff --git a/Grasshopper/SAM.Analytical.Grasshopper.Topologic/Properties/AssemblyInfo.cs b/Grasshopper/SAM.Analytical.Grasshopper.Topologic/Properties/AssemblyInfo.cs index 46ad553..aaa5bd6 100644 --- a/Grasshopper/SAM.Analytical.Grasshopper.Topologic/Properties/AssemblyInfo.cs +++ b/Grasshopper/SAM.Analytical.Grasshopper.Topologic/Properties/AssemblyInfo.cs @@ -55,6 +55,3 @@ // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Grasshopper/SAM.Analytical.Grasshopper.Topologic/SAM.Analytical.Grasshopper.Topologic.csproj b/Grasshopper/SAM.Analytical.Grasshopper.Topologic/SAM.Analytical.Grasshopper.Topologic.csproj index 264d016..be73021 100644 --- a/Grasshopper/SAM.Analytical.Grasshopper.Topologic/SAM.Analytical.Grasshopper.Topologic.csproj +++ b/Grasshopper/SAM.Analytical.Grasshopper.Topologic/SAM.Analytical.Grasshopper.Topologic.csproj @@ -10,7 +10,6 @@ false true true - false false false diff --git a/Grasshopper/SAM.Core.Grasshopper.Topologic/Kernel/AssemblyInfo.cs b/Grasshopper/SAM.Core.Grasshopper.Topologic/Kernel/AssemblyInfo.cs index bf2e417..0aaee5f 100644 --- a/Grasshopper/SAM.Core.Grasshopper.Topologic/Kernel/AssemblyInfo.cs +++ b/Grasshopper/SAM.Core.Grasshopper.Topologic/Kernel/AssemblyInfo.cs @@ -1,4 +1,7 @@ -using Grasshopper.Kernel; +// SPDX-License-Identifier: LGPL-3.0-or-later +// Copyright (c) 2020–2026 Michal Dengusiak & Jakub Ziolkowski and contributors + +using Grasshopper.Kernel; using System; using System.Drawing; diff --git a/Grasshopper/SAM.Core.Grasshopper.Topologic/Properties/AssemblyInfo.cs b/Grasshopper/SAM.Core.Grasshopper.Topologic/Properties/AssemblyInfo.cs index 4f57f7d..f3ba277 100644 --- a/Grasshopper/SAM.Core.Grasshopper.Topologic/Properties/AssemblyInfo.cs +++ b/Grasshopper/SAM.Core.Grasshopper.Topologic/Properties/AssemblyInfo.cs @@ -55,6 +55,3 @@ // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Grasshopper/SAM.Core.Grasshopper.Topologic/SAM.Core.Grasshopper.Topologic.csproj b/Grasshopper/SAM.Core.Grasshopper.Topologic/SAM.Core.Grasshopper.Topologic.csproj index 83e4cda..3fa508b 100644 --- a/Grasshopper/SAM.Core.Grasshopper.Topologic/SAM.Core.Grasshopper.Topologic.csproj +++ b/Grasshopper/SAM.Core.Grasshopper.Topologic/SAM.Core.Grasshopper.Topologic.csproj @@ -10,7 +10,6 @@ false true true - false false false diff --git a/Grasshopper/SAM.Geometry.Grasshopper.Topologic/Kernel/AssemblyInfo.cs b/Grasshopper/SAM.Geometry.Grasshopper.Topologic/Kernel/AssemblyInfo.cs index e0893a4..ef91e90 100644 --- a/Grasshopper/SAM.Geometry.Grasshopper.Topologic/Kernel/AssemblyInfo.cs +++ b/Grasshopper/SAM.Geometry.Grasshopper.Topologic/Kernel/AssemblyInfo.cs @@ -1,4 +1,7 @@ -using Grasshopper.Kernel; +// SPDX-License-Identifier: LGPL-3.0-or-later +// Copyright (c) 2020–2026 Michal Dengusiak & Jakub Ziolkowski and contributors + +using Grasshopper.Kernel; using System; using System.Drawing; diff --git a/Grasshopper/SAM.Geometry.Grasshopper.Topologic/Properties/AssemblyInfo.cs b/Grasshopper/SAM.Geometry.Grasshopper.Topologic/Properties/AssemblyInfo.cs index 0a033b1..c080d39 100644 --- a/Grasshopper/SAM.Geometry.Grasshopper.Topologic/Properties/AssemblyInfo.cs +++ b/Grasshopper/SAM.Geometry.Grasshopper.Topologic/Properties/AssemblyInfo.cs @@ -55,6 +55,3 @@ // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Grasshopper/SAM.Geometry.Grasshopper.Topologic/SAM.Geometry.Grasshopper.Topologic.csproj b/Grasshopper/SAM.Geometry.Grasshopper.Topologic/SAM.Geometry.Grasshopper.Topologic.csproj index 8cde6cd..566ba8c 100644 --- a/Grasshopper/SAM.Geometry.Grasshopper.Topologic/SAM.Geometry.Grasshopper.Topologic.csproj +++ b/Grasshopper/SAM.Geometry.Grasshopper.Topologic/SAM.Geometry.Grasshopper.Topologic.csproj @@ -10,7 +10,6 @@ false true true - false false false diff --git a/SAM_Topologic/SAM.Analytical.Topologic/Properties/AssemblyInfo.cs b/SAM_Topologic/SAM.Analytical.Topologic/Properties/AssemblyInfo.cs index 2c3e0d1..ca82c5a 100644 --- a/SAM_Topologic/SAM.Analytical.Topologic/Properties/AssemblyInfo.cs +++ b/SAM_Topologic/SAM.Analytical.Topologic/Properties/AssemblyInfo.cs @@ -1,4 +1,7 @@ -using System.Reflection; +// SPDX-License-Identifier: LGPL-3.0-or-later +// Copyright (c) 2020–2026 Michal Dengusiak & Jakub Ziolkowski and contributors + +using System.Reflection; using System.Runtime.InteropServices; [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/SAM_Topologic/SAM.Analytical.Topologic/SAM.Analytical.Topologic.csproj b/SAM_Topologic/SAM.Analytical.Topologic/SAM.Analytical.Topologic.csproj index 372741e..5890e8f 100644 --- a/SAM_Topologic/SAM.Analytical.Topologic/SAM.Analytical.Topologic.csproj +++ b/SAM_Topologic/SAM.Analytical.Topologic/SAM.Analytical.Topologic.csproj @@ -2,7 +2,6 @@ netstandard2.0 Library - False false false false @@ -57,7 +56,5 @@ Copy /Y "$(SolutionDir)references\TK*.dll" "$(SolutionDir)build\TK*.dll"SAM_Topologic SAM_Topologic Copyright © 2019 - 1.0.0.0 - 1.0.0.0 \ No newline at end of file diff --git a/SAM_Topologic/SAM.Core.Topologic/Properties/AssemblyInfo.cs b/SAM_Topologic/SAM.Core.Topologic/Properties/AssemblyInfo.cs index 1aceea8..e9218cf 100644 --- a/SAM_Topologic/SAM.Core.Topologic/Properties/AssemblyInfo.cs +++ b/SAM_Topologic/SAM.Core.Topologic/Properties/AssemblyInfo.cs @@ -1,4 +1,7 @@ -/* +// SPDX-License-Identifier: LGPL-3.0-or-later +// Copyright (c) 2020–2026 Michal Dengusiak & Jakub Ziolkowski and contributors + +/* * This file is part of the Sustaiable Analytical Model (SAM) * Copyright (c) 2020, the respective contributors. All rights reserved. * diff --git a/SAM_Topologic/SAM.Core.Topologic/SAM.Core.Topologic.csproj b/SAM_Topologic/SAM.Core.Topologic/SAM.Core.Topologic.csproj index 2dfc901..d4494b0 100644 --- a/SAM_Topologic/SAM.Core.Topologic/SAM.Core.Topologic.csproj +++ b/SAM_Topologic/SAM.Core.Topologic/SAM.Core.Topologic.csproj @@ -2,7 +2,6 @@ netstandard2.0 Library - False false false false @@ -42,7 +41,5 @@ Copy /Y "$(SolutionDir)references\tbb*.dll" "$(SolutionDir)build\tbb*.dll"SAM_Topologic SAM_Topologic Copyright (c) 2020-2026 Michal Dengusiak & Jakub Ziolkowski and contributors - 1.0.0.0 - 1.0.0.0 \ No newline at end of file diff --git a/SAM_Topologic/SAM.Geometry.Topologic/Properties/AssemblyInfo.cs b/SAM_Topologic/SAM.Geometry.Topologic/Properties/AssemblyInfo.cs index 4ec2925..0ddc3bc 100644 --- a/SAM_Topologic/SAM.Geometry.Topologic/Properties/AssemblyInfo.cs +++ b/SAM_Topologic/SAM.Geometry.Topologic/Properties/AssemblyInfo.cs @@ -1,4 +1,7 @@ -/* +// SPDX-License-Identifier: LGPL-3.0-or-later +// Copyright (c) 2020–2026 Michal Dengusiak & Jakub Ziolkowski and contributors + +/* * This file is part of the Sustaiable Analytical Model (SAM) * Copyright (c) 2020, the respective contributors. All rights reserved. * diff --git a/SAM_Topologic/SAM.Geometry.Topologic/SAM.Geometry.Topologic.csproj b/SAM_Topologic/SAM.Geometry.Topologic/SAM.Geometry.Topologic.csproj index a69d574..3ecdb4f 100644 --- a/SAM_Topologic/SAM.Geometry.Topologic/SAM.Geometry.Topologic.csproj +++ b/SAM_Topologic/SAM.Geometry.Topologic/SAM.Geometry.Topologic.csproj @@ -2,7 +2,6 @@ netstandard2.0 Library - False false false false @@ -36,7 +35,5 @@ Copy /Y "$(SolutionDir)references\TK*.dll" "$(SolutionDir)build\TK*.dll"SAM_Topologic SAM_Topologic Copyright (c) 2020-2026 Michal Dengusiak & Jakub Ziolkowski and contributors - 1.0.0.0 - 1.0.0.0 \ No newline at end of file From ba4212ec41f428f0ba791f5a42fe2ff20dee106e Mon Sep 17 00:00:00 2001 From: Michal Dengusiak Date: Thu, 21 May 2026 10:20:58 +0200 Subject: [PATCH 7/8] build: emit AssemblyInformationalVersion for non-SDK projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mirrors SAM sow/2026-Q2. Adds AssemblyInformationalVersion attribute generation to Path D's SAMVersion.g.cs Target — covers Grasshopper / Tas-bridge assemblies that have GenerateAssemblyInfo=false, so they also get the CI commit SHA stamp in their ProductVersion field. SDK projects pick up InformationalVersion via PropertyGroup auto-gen as before. Local dev builds unchanged. --- Directory.Build.props | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 9841655..b6b921f 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,10 +1,17 @@ - + 1.0.0.0 $(SAMVersion) $(SAMVersion) + + $(SAMVersion)+$(SAMSourceRevision) true @@ -23,6 +30,9 @@ <_SAMVersionLine Include="// <auto-generated />" /> <_SAMVersionLine Include="[assembly: System.Reflection.AssemblyVersionAttribute("$(SAMVersion)")]" /> <_SAMVersionLine Include="[assembly: System.Reflection.AssemblyFileVersionAttribute("$(SAMVersion)")]" /> + + <_SAMVersionLine Include="[assembly: System.Reflection.AssemblyInformationalVersionAttribute("$(InformationalVersion)")]" Condition="'$(InformationalVersion)' != ''" /> Date: Thu, 21 May 2026 12:53:29 +0200 Subject: [PATCH 8/8] build: emit AssemblyInformationalVersion for non-SDK projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mirrors SAM sow/2026-Q2. Adds AssemblyInformationalVersion attribute generation to Path D's SAMVersion.g.cs Target — covers Grasshopper / Tas-bridge assemblies that have GenerateAssemblyInfo=false, so they also get the CI commit SHA stamp in their ProductVersion field. SDK projects pick up InformationalVersion via PropertyGroup auto-gen as before. Local dev builds unchanged. --- Directory.Build.props | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Directory.Build.props b/Directory.Build.props index b6b921f..509f4c6 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -12,6 +12,14 @@ that and don't overwrite. Local dev builds leave both empty -> no SHA attribute emitted. --> $(SAMVersion)+$(SAMSourceRevision) + + false true