Skip to content

Commit 7d1d790

Browse files
authored
Merge pull request #7 from panesofglass/build
Update build to support tags
2 parents d82d4cd + 5f0cf19 commit 7d1d790

8 files changed

Lines changed: 65 additions & 41 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ $tf/
8787
_ReSharper*/
8888
*.[Rr]e[Ss]harper
8989
*.DotSettings.user
90+
.idea/
9091

9192
# JustCode is a .NET coding addin-in
9293
.JustCode

.travis.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
language: csharp
22

3-
mono: 5.2.0
4-
dotnet: 2.0.0
3+
dotnet: 2.1.402
4+
5+
mono:
6+
- 5.2.0
57

68
install:
79
- mozroots --import --sync
@@ -13,19 +15,19 @@ matrix:
1315
- os: linux # Ubuntu 14.04
1416
dist: trusty
1517
sudo: required
16-
dotnet: 2.0.0
18+
dotnet: 2.1.402
1719
- os: osx # OSX 10.12
1820
osx_image: xcode9.1
19-
dotnet: 2.0.0
21+
dotnet: 2.1.402
2022
dist: trusty
2123
sudo: required
2224

2325
script:
2426
- dotnet --info
2527
- dotnet restore
2628
- dotnet build -c Release
27-
- dotnet pack -c Release --include-symbols
29+
- dotnet pack --no-build -c Release --include-symbols
2830

2931
branches:
3032
except:
31-
- gh-pages
33+
- gh-pages

appveyor.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
version: 5.0.1-aci-{build}
2-
1+
image: Visual Studio 2017
32
build_script:
4-
- ps: dotnet --info
5-
- ps: dotnet restore
6-
- ps: dotnet build -c Release --version-suffix "aci-${env:APPVEYOR_BUILD_NUMBER}"
7-
- ps: dotnet pack -c Release --include-symbols --version-suffix "aci-${env:APPVEYOR_BUILD_NUMBER}"
8-
9-
test: off
10-
3+
- ps: |
4+
.\build.ps1
5+
if ($lastexitcode -ne 0){ exit $lastexitcode }
116
artifacts:
12-
- path: '**\*.nupkg'
7+
- path: bin\*.nupkg
8+

build.ps1

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[xml]$doc = Get-Content .\src\Directory.Build.props
2+
$version = $doc.Project.PropertyGroup.VersionPrefix # the version under development, update after a release
3+
$versionSuffix = '-build.0' # manually incremented for local builds
4+
5+
function isVersionTag($tag){
6+
$v = New-Object Version
7+
[Version]::TryParse($tag, [ref]$v)
8+
}
9+
10+
if ($env:appveyor){
11+
$versionSuffix = '-build.' + $env:appveyor_build_number
12+
if ($env:appveyor_repo_tag -eq 'true' -and (isVersionTag($env:appveyor_repo_tag_name))){
13+
$version = $env:appveyor_repo_tag_name
14+
$versionSuffix = ''
15+
}
16+
Update-AppveyorBuild -Version "$version$versionSuffix"
17+
}
18+
19+
dotnet build -c Release Hephaestus.sln /p:Version=$version$versionSuffix
20+
dotnet pack --no-build -c Release src/Hephaestus /p:Version=$version$versionSuffix -o $psscriptroot/bin

src/Directory.Build.props

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
<?xml version="1.0" encoding="utf-8" standalone="no"?>
22
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
4-
<VersionPrefix>5.0.1</VersionPrefix>
4+
<TargetFrameworks>netstandard2.0;net45</TargetFrameworks>
5+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
6+
<DefineConstants Condition="'$(Hopac)' == 'true'">$(DefineConstants);HOPAC</DefineConstants>
7+
8+
<VersionPrefix>5.1.0</VersionPrefix>
59
<Authors>Andrew Cherry</Authors>
610
<Description>Graph-base protocol machines for F#</Description>
711
<Description Condition="'$(Hopac)' == 'true'">$(Description) powered by the Hopac concurrency library</Description>
@@ -12,5 +16,30 @@
1216
<RepositoryUrl>https://github.com/xyncro/hephaestus</RepositoryUrl>
1317
<PackageTags>$(PackageTags);protocol;machine;functional;graphs;f#;fsharp</PackageTags>
1418
<PackageTags Condition="'$(Hopac)' == 'true'">$(PackageTags);hopac</PackageTags>
19+
20+
<!-- SourceLink related properties https://github.com/dotnet/SourceLink#using-sourcelink -->
21+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
22+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
23+
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
1524
</PropertyGroup>
25+
26+
<ItemGroup>
27+
<Compile Include="$(MSBuildThisFileDirectory)Hephaestus\Hephaestus.fs" />
28+
<EmbeddedResource Include="**\*.resx" />
29+
</ItemGroup>
30+
31+
<ItemGroup>
32+
<PackageReference Update="FSharp.Core" Version="4.3.4" />
33+
<PackageReference Include="Aether" Version="[8.2.0,9)" />
34+
<PackageReference Include="Anat" Version="[1.0.1,2)" />
35+
<PackageReference Include="Hekate" Version="[3.2.1,4)" />
36+
</ItemGroup>
37+
38+
<ItemGroup Condition="'$(Hopac)' == 'true'">
39+
<PackageReference Include="Hopac" Version="0.3.23" />
40+
</ItemGroup>
41+
42+
<ItemGroup>
43+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-*" PrivateAssets="All" />
44+
</ItemGroup>
1645
</Project>

src/Hephaestus.Common.targets

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/Hephaestus.Hopac/Hephaestus.Hopac.fsproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
<PropertyGroup>
33
<Hopac>true</Hopac>
44
</PropertyGroup>
5-
<Import Project="..\Hephaestus.Common.targets" />
65
</Project>

src/Hephaestus/Hephaestus.fsproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<Import Project="..\Hephaestus.Common.targets" />
32
</Project>

0 commit comments

Comments
 (0)