From 418eb0ed4b5bb1255c70fe33d4364a292af5e185 Mon Sep 17 00:00:00 2001 From: Adrian Hall Date: Fri, 17 Jan 2025 13:00:03 -0800 Subject: [PATCH 1/4] (#195) Updated csproj.template to support build version --- .../Template.DatasyncServer.csproj.template | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/Template.DatasyncServer/Template.DatasyncServer.csproj.template b/templates/Template.DatasyncServer/Template.DatasyncServer.csproj.template index c1051599..9ba69ceb 100644 --- a/templates/Template.DatasyncServer/Template.DatasyncServer.csproj.template +++ b/templates/Template.DatasyncServer/Template.DatasyncServer.csproj.template @@ -1,6 +1,6 @@ - net8.0 + net9.0 enable enable latest @@ -8,10 +8,10 @@ - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive From a7c74e874476961f5f47ef23ad37feb4e3f0d699 Mon Sep 17 00:00:00 2001 From: Adrian Hall Date: Fri, 17 Jan 2025 13:06:55 -0800 Subject: [PATCH 2/4] (#195) Second attempt at fixing replacement. --- .github/workflows/build-template.yml | 2 +- .../Template.DatasyncServer.csproj.template | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-template.yml b/.github/workflows/build-template.yml index 12309b8b..695e529a 100644 --- a/.github/workflows/build-template.yml +++ b/.github/workflows/build-template.yml @@ -52,7 +52,7 @@ jobs: - name: Generate csproj working-directory: templates/Template.DatasyncServer run: | - (Get-Content -path "Template.DatasyncServer.csproj.template") -replace "${NUGET_VERSION}", $BUILD_VERSION | Set-Content -Path "./Template.DatasyncServer.csproj" + (Get-Content -path "Template.DatasyncServer.csproj.template") -replace "{NUGET_VERSION}", $BUILD_VERSION | Set-Content -Path "./Template.DatasyncServer.csproj" shell: pwsh - name: Build template diff --git a/templates/Template.DatasyncServer/Template.DatasyncServer.csproj.template b/templates/Template.DatasyncServer/Template.DatasyncServer.csproj.template index 9ba69ceb..91010622 100644 --- a/templates/Template.DatasyncServer/Template.DatasyncServer.csproj.template +++ b/templates/Template.DatasyncServer/Template.DatasyncServer.csproj.template @@ -8,8 +8,8 @@ - - + + all From 4e91904ec6719a96bc30b7e2a32482a40cd30b2c Mon Sep 17 00:00:00 2001 From: Adrian Hall Date: Fri, 17 Jan 2025 13:12:17 -0800 Subject: [PATCH 3/4] (#195) Temp change to record build version as write-host --- .github/workflows/build-template.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-template.yml b/.github/workflows/build-template.yml index 695e529a..4818fd01 100644 --- a/.github/workflows/build-template.yml +++ b/.github/workflows/build-template.yml @@ -52,6 +52,8 @@ jobs: - name: Generate csproj working-directory: templates/Template.DatasyncServer run: | + Write-Host "BUILD_VERSION (env)=$($env:BUILD_VERSION)" + Write-Host "BUILD_VERSION (var)=$BUILD_VERSION" (Get-Content -path "Template.DatasyncServer.csproj.template") -replace "{NUGET_VERSION}", $BUILD_VERSION | Set-Content -Path "./Template.DatasyncServer.csproj" shell: pwsh From 776bf7a876ad2539f089f22c6beeed58a5cdee31 Mon Sep 17 00:00:00 2001 From: Adrian Hall Date: Fri, 17 Jan 2025 13:14:34 -0800 Subject: [PATCH 4/4] (#195) Fix to powershell script for generating csproj --- .github/workflows/build-template.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-template.yml b/.github/workflows/build-template.yml index 4818fd01..cefbed6b 100644 --- a/.github/workflows/build-template.yml +++ b/.github/workflows/build-template.yml @@ -53,8 +53,7 @@ jobs: working-directory: templates/Template.DatasyncServer run: | Write-Host "BUILD_VERSION (env)=$($env:BUILD_VERSION)" - Write-Host "BUILD_VERSION (var)=$BUILD_VERSION" - (Get-Content -path "Template.DatasyncServer.csproj.template") -replace "{NUGET_VERSION}", $BUILD_VERSION | Set-Content -Path "./Template.DatasyncServer.csproj" + (Get-Content -path "Template.DatasyncServer.csproj.template") -replace "{NUGET_VERSION}", $env:BUILD_VERSION | Set-Content -Path "./Template.DatasyncServer.csproj" shell: pwsh - name: Build template