diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e2bc7a1..a8de2fe 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -56,8 +56,12 @@ jobs: $env:PackageVersion = $env:PackageVersionOverride } Write-Host "build version set to $env:PackageVersion" + $prefix = $env:PackageVersion.Split('-')[0] + $suffix = $env:PackageVersion.Split('-')[1] Write-Host "##vso[build.updatebuildnumber]$env:PackageVersion" Write-Host "##vso[task.setvariable variable=PackageVersion;]$env:PackageVersion" + Write-Host "##vso[task.setvariable variable=VersionPrefix;]$prefix" + Write-Host "##vso[task.setvariable variable=VersionSuffix;]$suffix" env: PackageVersion: $(PackageVersion) PackageVersionOverride: $(PackageVersionOverride) @@ -67,7 +71,7 @@ jobs: inputs: command: 'pack' packagesToPack: '$(Solution).sln' - arguments: '--configuration Release /p:Version=$(ProductVersion) /p:TreatWarningsAsErrors=True' + arguments: '--configuration $(buildConfiguration) /p:TreatWarningsAsErrors=True /p:VersionPrefix=$(VersionPrefix) /p:VersionSuffix=$(VersionSuffix)' versioningScheme: 'byEnvVar' versionEnvVar: 'PackageVersion' - task: 'DotNetCoreCLI@2' diff --git a/config/versions-dev.props b/config/versions-dev.props index 3d56926..cd50998 100644 --- a/config/versions-dev.props +++ b/config/versions-dev.props @@ -1,7 +1,5 @@ - $(STEELTOE_VERSION) - $(STEELTOE_DASH_VERSION_SUFFIX) 2.4.3 2.2.5 2.1.1 diff --git a/config/versions.props b/config/versions.props index 3d56926..cd50998 100644 --- a/config/versions.props +++ b/config/versions.props @@ -1,7 +1,5 @@ - $(STEELTOE_VERSION) - $(STEELTOE_DASH_VERSION_SUFFIX) 2.4.3 2.2.5 2.1.1 diff --git a/src/Steeltoe.Cli/Steeltoe.Cli.csproj b/src/Steeltoe.Cli/Steeltoe.Cli.csproj index 8ce0295..ddfb280 100644 --- a/src/Steeltoe.Cli/Steeltoe.Cli.csproj +++ b/src/Steeltoe.Cli/Steeltoe.Cli.csproj @@ -11,8 +11,8 @@ https://steeltoe.io Docker, CloudFoundry https://www.apache.org/licenses/LICENSE-2.0 - $(SteeltoeVersion) - $(SteeltoeVersionSuffix) + $(VersionPrefix) + $(VersionSuffix) diff --git a/src/Steeltoe.Tooling/Steeltoe.Tooling.csproj b/src/Steeltoe.Tooling/Steeltoe.Tooling.csproj index d30d628..2960b2c 100644 --- a/src/Steeltoe.Tooling/Steeltoe.Tooling.csproj +++ b/src/Steeltoe.Tooling/Steeltoe.Tooling.csproj @@ -9,8 +9,8 @@ https://steeltoe.io Docker, CloudFoundry https://www.apache.org/licenses/LICENSE-2.0 - $(SteeltoeVersion) - $(SteeltoeVersionSuffix) + $(VersionPrefix) + $(VersionSuffix)