Skip to content

Commit

Permalink
Merge pull request #386 from shouldly/netcore
Browse files Browse the repository at this point in the history
Switch to dotnet cli RC2 Preview 1 Tooling
  • Loading branch information
JakeGinnivan committed Jun 17, 2016
2 parents 7638f8c + 597807b commit 5de810d
Show file tree
Hide file tree
Showing 473 changed files with 1,115 additions and 4,761 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,8 @@ src/.vs
*.received.txt
src/TestResults/
src/TestDiffTools/Main.approved.txt
tools/Cake/
tools/Addins/
tools/GitReleaseNotes/
artifacts/
*.lock.json
10 changes: 10 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>

<configuration>
<packageSources>
<!-- add key="CoreCLR Xunit" value="https://www.myget.org/F/coreclr-xunit/api/v3/index.json" / -->
<!-- add key="AspNet CI Feed" value="https://www.myget.org/F/aspnetcirelease/api/v3/index.json" /> -->
<add key="myget.org xunit" value="https://www.myget.org/F/xunit/api/v3/index.json" />
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,16 @@ The commit was only in master for <24 hours but if you happened to pull then you

## Icon
[Star](https://thenounproject.com/term/star/20931/) created by [Luboš Volkov](https://thenounproject.com/Lubo%C5%A1%20Volkov/) from The Noun Project

## Currently maintained by
- [Jake Ginnivan](https://github.com/JakeGinnivan)
- [Joseph Woodward](https://github.com/JosephWoodward)

If you are interested in helping out, jump on gitter and have a chat

## Brought to you by
- Dave Newman
- Xerxes Battiwalla
- Anthony Egerton
- Peter van der Woude
- Jake Ginnivan
158 changes: 0 additions & 158 deletions ReleaseNotes.md

This file was deleted.

14 changes: 14 additions & 0 deletions appveyor.deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
assembly_info:
patch: false

platform:
- Any CPU

configuration:
- Debug

build_script:
- ps: ./deploy.ps1

test: off
skip_non_tags: true
15 changes: 4 additions & 11 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
install:
- choco install gitversion.portable -pre -y

assembly_info:
patch: false

Expand All @@ -11,11 +8,7 @@ configuration:
- Debug

build_script:
- cmd: nuget restore src\
- cmd: gitversion /l console /output buildserver /updateAssemblyInfo

- cmd: msbuild src\Shouldly.sln "/p:Configuration=%CONFIGURATION%;Platform=%PLATFORM%"

- cmd: ECHO nuget pack Shouldly.nuspec -version "%GitVersion_NuGetVersion%" -prop "target=%CONFIGURATION%"
- cmd: nuget pack Shouldly.nuspec -version "%GitVersion_NuGetVersion%" -prop "target=%CONFIGURATION%"
- cmd: appveyor PushArtifact "Shouldly.%GitVersion_NuGetVersion%.nupkg"
- ps: ./build.ps1

test: off
skip_tags: true
88 changes: 88 additions & 0 deletions build.cake
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
#tool "nuget:?package=GitReleaseNotes"

var target = Argument("target", "Default");
var shouldlyProj = "./src/Shouldly/project.json";
var outputDir = "./artifacts/";

Task("Clean")
.Does(() => {
if (DirectoryExists(outputDir))
{
DeleteDirectory(outputDir, recursive:true);
}
});

Task("Restore")
.Does(() => {
NuGetRestore("./src/Shouldly.sln");
});

GitVersion versionInfo = null;
Task("Version")
.Does(() => {
GitVersion(new GitVersionSettings{
UpdateAssemblyInfo = true,
OutputType = GitVersionOutput.BuildServer
});
versionInfo = GitVersion(new GitVersionSettings{ OutputType = GitVersionOutput.Json });
// Update project.json
var updatedProjectJson = System.IO.File.ReadAllText(shouldlyProj)
.Replace("1.0.0-*", versionInfo.NuGetVersion);
System.IO.File.WriteAllText(shouldlyProj, updatedProjectJson);
});

Task("Build")
.IsDependentOn("Clean")
.IsDependentOn("Version")
.IsDependentOn("Restore")
.Does(() => {
MSBuild("./src/Shouldly.sln");
});

Task("Test")
.IsDependentOn("Build")
.Does(() => {
DotNetCoreTest("./src/Shouldly.Tests");
});

Task("Package")
.IsDependentOn("Test")
.Does(() => {
var settings = new DotNetCorePackSettings
{
OutputDirectory = outputDir,
NoBuild = true
};
DotNetCorePack(shouldlyProj, settings);
// TODO not sure why this isn't working
// GitReleaseNotes("outputDir/releasenotes.md", new GitReleaseNotesSettings {
// WorkingDirectory = ".",
// AllTags = false
// });
var releaseNotesExitCode = StartProcess(
@"tools\GitReleaseNotes\tools\gitreleasenotes.exe",
new ProcessSettings { Arguments = ". /o artifacts/releasenotes.md" });
if (releaseNotesExitCode != 0) throw new Exception("Failed to generate release notes");
System.IO.File.WriteAllLines(outputDir + ".artifacts", new[]{
"nuget:Shouldly." + versionInfo.NuGetVersion + ".nupkg",
"nugetSymbols:Shouldly." + versionInfo.NuGetVersion + ".symbols.nupkg",
"releaseNotes:releasenotes.md"
});
if (AppVeyor.IsRunningOnAppVeyor)
{
foreach (var file in GetFiles(outputDir + "**/*"))
AppVeyor.UploadArtifact(file.FullPath);
}
});

Task("Default")
.IsDependentOn("Package");

RunTarget(target);

0 comments on commit 5de810d

Please sign in to comment.