diff --git a/Directory.Build.props b/Directory.Build.props
index 91b28b5..eca9eee 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -1,13 +1,12 @@
- 0.0.7
@jet @bartelink and contributors
Jet.com
Apply systemwide resilience strategies consistently across subsystems, standing on Polly's shoulders
https://github.com/jet/callpolly
polly bulkhead circuitbreaker timeout fsharp
https://github.com/jet/callpolly/blob/master/LICENSE
- Copyright © 2018
+ Copyright © 2018-9
true
diff --git a/Directory.Build.targets b/Directory.Build.targets
index 406b73c..9761fd7 100644
--- a/Directory.Build.targets
+++ b/Directory.Build.targets
@@ -3,4 +3,18 @@
+
+
+ $(MinVerMajor).$(MinVerMinor).$(MinVerPatch)-pr.$(BUILD_PR)
+ $(PackageVersion).$(MinVerPreRelease)
+ $(PackageVersion)+$(MinVerBuildMetadata)
+ $(PackageVersion)
+
+
+
+
+ 0
+ $(MinVerMajor).$(MinVerMinor).$(MinVerPatch).$(BUILD_ID)
+
+
\ No newline at end of file
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 1b40c2d..b4ee0b2 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -1,4 +1,7 @@
name: $(Rev:r)
+trigger:
+- master
+- refs/tags/*
jobs:
- job: Windows
pool:
@@ -26,18 +29,15 @@ jobs:
testResultsFormat: 'VSTest'
testResultsFiles: 'tests/**/*.trx'
condition: succeededOrFailed()
- - powershell: |
- $buildId = $env:BUILD_BUILDNUMBER.PadLeft(7, '0');
- $versionSuffixPR = "ci-$buildId-pr$($env:SYSTEM_PULLREQUEST_PULLREQUESTNUMBER)";
- $branchName = "$env:BUILD_SOURCEBRANCHNAME".Replace("_","");
- $versionSuffixBRANCH = "$branchName-$buildId";
- $isTag = "$env:BUILD_SOURCEBRANCH".StartsWith('refs/tags/');
- $isPR = "$env:SYSTEM_PULLREQUEST_PULLREQUESTNUMBER" -ne ""
- $versionSuffix = if ($isTag) { "" } else { if ($isPR) { $versionSuffixPR } else { $versionSuffixBRANCH } };
- Write-Host "##vso[task.setvariable variable=VersionSuffix]$versionSuffix";
- displayName: compute VersionSuffix
- script: dotnet pack build.proj
- displayName: dotnet pack
+ displayName: dotnet pack build.proj
+ env:
+ BUILD_PR: $(SYSTEM.PULLREQUEST.PULLREQUESTNUMBER)
+ BUILD_ID: $(BUILD.BUILDNUMBER)
+ - task: PublishBuildArtifacts@1
+ inputs:
+ pathtoPublish: 'bin'
+ artifactName: 'nupkgs'
- task: NuGetCommand@2
condition: succeededOrFailed()
inputs:
@@ -61,4 +61,4 @@ jobs:
testResultsFiles: 'tests/**/*.trx'
condition: succeededOrFailed()
- script: dotnet pack build.proj
- displayName: dotnet pack
+ displayName: dotnet pack
\ No newline at end of file
diff --git a/build.proj b/build.proj
index cdfef29..4af10d9 100644
--- a/build.proj
+++ b/build.proj
@@ -6,9 +6,11 @@
--configuration Release
$([System.IO.Path]::GetFullPath("$(MSBuildThisFileDirectory)"))
- -o $(ThisDirAbsolute)bin --version-suffix "$(VersionSuffix)"
- --logger:trx
+ /p:BUILD_PR=$(BUILD_PR)
+ /p:BUILD_ID=$(BUILD_ID) $(PrOption) -o $(ThisDirAbsolute)bin
+
+ --logger:trx
diff --git a/src/CallPolly.Core/CallPolly.Core.fsproj b/src/CallPolly.Core/CallPolly.Core.fsproj
index bf5ba4f..12d900b 100644
--- a/src/CallPolly.Core/CallPolly.Core.fsproj
+++ b/src/CallPolly.Core/CallPolly.Core.fsproj
@@ -19,6 +19,8 @@
+
+
@@ -26,4 +28,4 @@
-
+
\ No newline at end of file
diff --git a/src/CallPolly/CallPolly.fsproj b/src/CallPolly/CallPolly.fsproj
index 2547cdc..6f72138 100644
--- a/src/CallPolly/CallPolly.fsproj
+++ b/src/CallPolly/CallPolly.fsproj
@@ -21,6 +21,8 @@
+
+
@@ -29,4 +31,4 @@
-
+
\ No newline at end of file