Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Automatic suffix generation for DTFx.Core and DTFx.AzureStorage #1025

Merged
merged 9 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion azure-pipelines-release.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
trigger: none
trigger:
- main

pr: none

pool:
name: '1ES-Hosted-DurableTaskFramework'
demands:
- ImageOverride -equals MMS2022TLS

variables:

- name: VersionSuffix
# The `Build.Reason` env var gets populated with `IndividualCI` on an automatic run of the CI,
# such as when a commit is made to `main`. If the CI is manually run, it will get populated with
# "Manual". For more details on these `Build.X` vars, see: https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#build-variables-devops-services
${{ if eq(variables['Build.Reason'], 'IndividualCI') }}:
cgillum marked this conversation as resolved.
Show resolved Hide resolved
# The `Build.BuildNumber` env var is an automatically-generated "build ID"
# for any given ADO run. It is usually the date format yyddmm.<counter> where
# `yyddmm` is a date formatter, and <counter> is a daily counter in case of multiple
# builds on the same date.
value: 'ci.$(Build.BuildNumber)'
${{ else }}:
value: ''

steps:
# Start by restoring all the dependencies. This needs to be its own task
# from what I can tell. We specifically only target DurableTask.AzureStorage
Expand Down
9 changes: 7 additions & 2 deletions src/DurableTask.AzureStorage/DurableTask.AzureStorage.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,21 @@
<MajorVersion>1</MajorVersion>
<MinorVersion>17</MinorVersion>
<PatchVersion>1</PatchVersion>

<VersionPrefix>$(MajorVersion).$(MinorVersion).$(PatchVersion)</VersionPrefix>
<FileVersion>$(VersionPrefix).0</FileVersion>
<!-- FileVersionRevision is expected to be set by the CI. This is useful for distinguishing between multiple builds of the same version. -->
<FileVersion Condition="'$(FileVersionRevision)' != ''">$(VersionPrefix).$(FileVersionRevision)</FileVersion>
<!-- The assembly version is only the major/minor pair, making it easier to do in-place upgrades -->
<AssemblyVersion>$(MajorVersion).$(MinorVersion).0.0</AssemblyVersion>
<!-- This version is used as the nuget package version -->
</PropertyGroup>

<!-- This version is used as the nuget package version -->
<PropertyGroup Condition="$(VersionSuffix) == ''">
<Version>$(VersionPrefix)</Version>
</PropertyGroup>
<PropertyGroup Condition="$(VersionSuffix) != ''">
<Version>$(VersionPrefix)-$(VersionSuffix)</Version>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="1.1.1" />
Expand Down
9 changes: 7 additions & 2 deletions src/DurableTask.Core/DurableTask.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,21 @@
<MajorVersion>2</MajorVersion>
<MinorVersion>16</MinorVersion>
<PatchVersion>2</PatchVersion>

<VersionPrefix>$(MajorVersion).$(MinorVersion).$(PatchVersion)</VersionPrefix>
<FileVersion>$(VersionPrefix).0</FileVersion>
<!-- FileVersionRevision is expected to be set by the CI. This is useful for distinguishing between multiple builds of the same version. -->
<FileVersion Condition="'$(FileVersionRevision)' != ''">$(VersionPrefix).$(FileVersionRevision)</FileVersion>
<!-- The assembly version is only the major/minor pair, making it easier to do in-place upgrades -->
<AssemblyVersion>$(MajorVersion).$(MinorVersion).0.0</AssemblyVersion>
<!-- This version is used as the nuget package version -->
</PropertyGroup>

<!-- This version is used as the nuget package version -->
<PropertyGroup Condition="$(VersionSuffix) == ''">
<Version>$(VersionPrefix)</Version>
</PropertyGroup>
<PropertyGroup Condition="$(VersionSuffix) != ''">
<Version>$(VersionPrefix)-$(VersionSuffix)</Version>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="1.1.1" />
Expand Down