Skip to content

Commit

Permalink
VersionSuffix environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
wallymathieu committed Aug 18, 2020
1 parent 538480b commit 723bc39
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
4 changes: 4 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
<PackageProjectUrl>https://github.com/fsprojects/FSharpPlus</PackageProjectUrl>
<PackageIconUrl>https://raw.github.com/fsprojects/FSharpPlus/master/docsrc/files/img/logo.png</PackageIconUrl>
<PackageTags>f# FSharp Applicative Monad MonadTransformer Arrow Overloading</PackageTags>
<VersionPrefix>1.2.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<Version Condition=" '$(VersionSuffix)' != '' ">$(VersionPrefix)-$(VersionSuffix)</Version>
<Version Condition=" '$(VersionSuffix)' == '' ">$(VersionPrefix)</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down
13 changes: 11 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
image: Visual Studio 2019

before_build:
- ps: >-
$buildId = $env:APPVEYOR_BUILD_NUMBER.PadLeft(5, '0');
$versionSuffixPR = "PR$($env:APPVEYOR_PULL_REQUEST_NUMBER)-$buildId";
$branchName = "$env:APPVEYOR_REPO_BRANCH".Replace("_","");
$versionSuffixBRANCH = if ("$env:APPVEYOR_REPO_BRANCH" -eq "v1.1.0") { "CI$buildId" } else { "$branchName-CI$buildId" };
$env:VersionSuffix = if ("$env:APPVEYOR_REPO_TAG" -eq "true") { "" } else { if ("$env:APPVEYOR_PULL_REQUEST_NUMBER") { $versionSuffixPR } else { $versionSuffixBRANCH } };
init:
- git config --global core.autocrlf input
install:
Expand All @@ -7,10 +16,10 @@ build_script:
- cmd: dotnet restore ./FSharpPlus.sln
- cmd: dotnet build -c Release ./FSharpPlus.sln
- cmd: dotnet test -c Release tests/FSharpPlus.Tests
- cmd: dotnet pack build.proj
- cmd: dotnet pack build.proj --version-suffix %VersionSuffix%
- ps: ./docsrc/tools/download_nugets.ps1
- cmd: dotnet run -c Release --project ./docsrc/tools
test: off
artifacts:
- path: bin
name: bin
name: bin
4 changes: 0 additions & 4 deletions src/FSharpPlus/FSharpPlus.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
<TargetFrameworks>netstandard2.0;net45</TargetFrameworks>
<Title>FSharpPlus</Title>
<AssemblyName>FSharpPlus</AssemblyName>
<VersionPrefix>1.2.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<Version Condition=" '$(VersionSuffix)' != '' ">$(VersionPrefix)-$(VersionSuffix)</Version>
<Version Condition=" '$(VersionSuffix)' == '' ">$(VersionPrefix)</Version>
<AssemblyVersion>$(VersionPrefix).0</AssemblyVersion>
<FileVersion>$(VersionPrefix).0</FileVersion>
<ProjectGuid>1368368e-d2f4-4fef-bb2f-492e05156e0f</ProjectGuid>
Expand Down
5 changes: 0 additions & 5 deletions src/FSharpPlus/Providers/FSharpPlus.Providers.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@
<TargetFrameworks>netstandard2.0;net45</TargetFrameworks>
<Title>FSharpPlus.Providers</Title>
<AssemblyName>FSharpPlus.Providers</AssemblyName>
<!--<VersionPrefix>1.0.0</VersionPrefix>
<VersionSuffix>
</VersionSuffix>-->
<Version Condition=" '$(VersionSuffix)' != '' ">$(VersionPrefix)-$(VersionSuffix)</Version>
<Version Condition=" '$(VersionSuffix)' == '' ">$(VersionPrefix)</Version>
<AssemblyVersion>$(VersionPrefix).0</AssemblyVersion>
<FileVersion>$(VersionPrefix).0</FileVersion>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand Down

0 comments on commit 723bc39

Please sign in to comment.