From 775a9d4bde4c8d1b1005c8a4179d8bd4b870eadb Mon Sep 17 00:00:00 2001 From: Daniel Weber Date: Thu, 21 Mar 2024 12:15:33 +0100 Subject: [PATCH] Automatically set the default value of the used Gremlinq version in templates to the determined NuGet Version. --- .github/workflows/pack.yml | 3 +++ templates/aspnet/.template.config/template.json | 2 +- templates/console/.template.config/template.json | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pack.yml b/.github/workflows/pack.yml index 280a322c97..c53b5ac3ab 100644 --- a/.github/workflows/pack.yml +++ b/.github/workflows/pack.yml @@ -36,6 +36,9 @@ jobs: uses: dotnet/nbgv@master id: nbgv + - name: Replace NuGet version default value in templates + run: find -name template.json -exec sed -i "s/TEMPLATE_GREMLINQ_VERSION_DEFAULT_VALUE/${{ steps.nbgv.outputs.NuGetPackageVersion }}/g" {} \; + - name: Build run: dotnet build ./${{ github.event.repository.name }}.sln -c Release -p:ContinuousIntegrationBuild=true diff --git a/templates/aspnet/.template.config/template.json b/templates/aspnet/.template.config/template.json index 5848028935..b82314c63e 100644 --- a/templates/aspnet/.template.config/template.json +++ b/templates/aspnet/.template.config/template.json @@ -40,7 +40,7 @@ "description": "The version of ExRam.Gremlinq being referenced", "type": "parameter", "datatype": "string", - "defaultValue": "12.1.2", + "defaultValue": "TEMPLATE_GREMLINQ_VERSION_DEFAULT_VALUE", "replaces": "TEMPLATE_GREMLINQ_VERSION" } } diff --git a/templates/console/.template.config/template.json b/templates/console/.template.config/template.json index 39519cb197..6b2daae83c 100644 --- a/templates/console/.template.config/template.json +++ b/templates/console/.template.config/template.json @@ -40,7 +40,7 @@ "description": "The version of ExRam.Gremlinq being referenced", "type": "parameter", "datatype": "string", - "defaultValue": "12.1.2", + "defaultValue": "TEMPLATE_GREMLINQ_VERSION_DEFAULT_VALUE", "replaces": "TEMPLATE_GREMLINQ_VERSION" } }