Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Commit

Permalink
Merge pull request #4 from panesofglass/build
Browse files Browse the repository at this point in the history
Update build
  • Loading branch information
panesofglass authored Oct 10, 2018
2 parents 484c4aa + c3e35c5 commit d72a04b
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 26 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ $tf/
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
.idea/

# JustCode is a .NET coding addin-in
.JustCode
Expand Down
14 changes: 8 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
language: csharp

mono: 5.2.0
dotnet: 2.0.0
dotnet: 2.1.402

mono:
- 5.2.0

install:
- mozroots --import --sync
Expand All @@ -13,19 +15,19 @@ matrix:
- os: linux # Ubuntu 14.04
dist: trusty
sudo: required
dotnet: 2.0.0
dotnet: 2.1.402
- os: osx # OSX 10.12
osx_image: xcode9.1
dotnet: 2.0.0
dotnet: 2.1.402
dist: trusty
sudo: required

script:
- dotnet --info
- dotnet restore
- dotnet build -c Release
- dotnet pack -c Release --include-symbols
- dotnet pack --no-build -c Release --include-symbols

branches:
except:
- gh-pages
- gh-pages
6 changes: 0 additions & 6 deletions NuGet.config

This file was deleted.

16 changes: 5 additions & 11 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
version: 4.0.0-aci-{build}

image: Visual Studio 2017
build_script:
- ps: dotnet --info
- ps: dotnet restore
- ps: dotnet build -c Release --version-suffix "aci-${env:APPVEYOR_BUILD_NUMBER}"
- ps: dotnet pack -c Release --include-symbols --version-suffix "aci-${env:APPVEYOR_BUILD_NUMBER}"

test: off

- ps: |
.\build.ps1
if ($lastexitcode -ne 0){ exit $lastexitcode }
artifacts:
- path: '**\*.nupkg'
- path: '**\BenchmarkDotNet.Artifacts\**\*.*'
- path: bin\*.nupkg
21 changes: 21 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[xml]$doc = Get-Content .\src\Directory.Build.props
$version = $doc.Project.PropertyGroup.VersionPrefix # the version under development, update after a release
$versionSuffix = '-build.0' # manually incremented for local builds

function isVersionTag($tag){
$v = New-Object Version
[Version]::TryParse($tag, [ref]$v)
}

if ($env:appveyor){
$versionSuffix = '-build.' + $env:appveyor_build_number
if ($env:appveyor_repo_tag -eq 'true' -and (isVersionTag($env:appveyor_repo_tag_name))){
$version = $env:appveyor_repo_tag_name
$versionSuffix = ''
}
Update-AppveyorBuild -Version "$version$versionSuffix"
}

dotnet build -c Release Freya.Testing.sln /p:Version=$version$versionSuffix
dotnet pack --no-build -c Release src/Freya.Testing /p:Version=$version$versionSuffix -o $psscriptroot/bin
dotnet pack --no-build -c Release src/Freya.Testing.Hopac /p:Version=$version$versionSuffix -o $psscriptroot/bin
9 changes: 9 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,14 @@
<RepositoryUrl>https://github.com/xyncro/freya-testing</RepositoryUrl>
<PackageTags>$(PackageTags);functional;web;freya;testing;f#;fsharp</PackageTags>
<PackageTags Condition="'$(Hopac)' == 'true'">$(PackageTags);hopac</PackageTags>
<GenerateDocumentationFile>true</GenerateDocumentationFile>

<!-- SourceLink related properties https://github.com/dotnet/SourceLink#using-sourcelink -->
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-*" PrivateAssets="All" />
</ItemGroup>
</Project>
8 changes: 5 additions & 3 deletions src/Freya.Testing.Common.targets
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<Project>
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<DefineConstants Condition="'$(Hopac)' == 'true'">$(DefineConstants);HOPAC</DefineConstants>
</PropertyGroup>

<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)Freya.Testing\Testing.fs" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="FSharp.Core" Version="4.3.4" />
<PackageReference Include="Aether" Version="[8.2.0,9)" />
</ItemGroup>

Expand All @@ -20,11 +22,11 @@
</ItemGroup>

<ItemGroup Condition="'$(Hopac)' != 'true'">
<PackageReference Include="Freya.Core" Version="[4.0.0-alpha-*,5)" />
<PackageReference Include="Freya.Core" Version="[4.0.*,5)" />
</ItemGroup>

<ItemGroup Condition="'$(Hopac)' == 'true'">
<PackageReference Include="Freya.Core.Hopac" Version="[4.0.0-alpha-*,5)" />
<PackageReference Include="Freya.Core.Hopac" Version="[4.0.*,5)" />
<PackageReference Include="Hopac" Version="0.3.23" />
</ItemGroup>
</Project>

0 comments on commit d72a04b

Please sign in to comment.