Skip to content

Commit 99968fa

Browse files
committed
Fix
1 parent 996e548 commit 99968fa

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ jobs:
3535
# if it is a pull request build set the build identity to branchname.runnumber
3636
if ("${{ github.event_name }}" -eq "pull_request" -and "${{ github.head_ref }}" -ne "") {
3737
$branchName = "${{ github.head_ref }}" -replace '[/\\]', '-' -replace '[^a-zA-Z0-9\-]', ''
38-
$env:MINVERDEFAULTPRERELEASEIDENTIFIERS = "octopus-$branchName.${{ github.run_number }}"
39-
Write-Host "PR build - pre-release identifiers: octopus-$branchName.${{ github.run_number }}"
38+
$buildIdentity = "$branchName.${{ github.run_number }}"
39+
40+
$env:BUILD_IDENTITY = $buildIdentity
4041
}
4142
4243
# if it is a scheduled build set the build identity to nightly
4344
if ("${{ github.event_name }}" -eq "schedule" -or "${{ inputs.nightly }}" -eq "true") {
44-
$env:MINVERDEFAULTPRERELEASEIDENTIFIERS = "nightly.${{ github.run_number }}"
45-
Write-Host "Nightly build - pre-release identifiers: nightly.${{ github.run_number }}"
45+
$env:BUILD_IDENTITY = "nightly.${{ github.run_number }}"
4646
}
4747
4848
dotnet build LibGit2Sharp.sln --configuration Release

LibGit2Sharp/LibGit2Sharp.csproj

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,17 @@
2121
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
2222
<PackageId>Octopus.LibGit2Sharp</PackageId>
2323
<PackageOutputPath>$(ArtifactsPath)\package</PackageOutputPath>
24-
<MinVerDefaultPreReleaseIdentifiers>octopus.0</MinVerDefaultPreReleaseIdentifiers>
24+
<MinVerDefaultPreReleaseIdentifiers>octopus.0</MinVerDefaultPreReleaseIdentifiers>
2525
<MinVerBuildMetadata Condition="'$(libgit2_hash)' != ''">libgit2-$(libgit2_hash.Substring(0,7))</MinVerBuildMetadata>
2626
</PropertyGroup>
27-
27+
2828
<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'">
2929
<IsTrimmable>true</IsTrimmable>
3030
</PropertyGroup>
31+
32+
<PropertyGroup Condition="'$(BUILD_IDENTITY)' != ''">
33+
<MinVerDefaultPreReleaseIdentifiers>octopus-$(BUILD_IDENTITY)</MinVerDefaultPreReleaseIdentifiers>
34+
</PropertyGroup>
3135

3236
<ItemGroup>
3337
<PackageReference Include="LibGit2Sharp.NativeBinaries" Version="[2.0.323]" PrivateAssets="none" />

0 commit comments

Comments
 (0)