-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from bt-skyrise/release/0.2.0-publish-nuget-pa…
…ckage Merge release/0.2.0-publish-nuget-package * #15 use options object in PostgresRunner API * #5 Added Cake build script (#23) * #7 Added Appveyor CI configuration (#24) * #10 Fix broken linux pg distribution (#28) * Added release,hotfix branches to CI build * Appveyor - verbose logging of gitversion
- Loading branch information
Showing
2,692 changed files
with
138,053 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
assembly-versioning-scheme: MajorMinor | ||
mode: ContinuousDelivery | ||
branches: | ||
dev(elop)?(ment)?$: | ||
mode: ContinuousDeployment | ||
master: | ||
mode: ContinuousDelivery | ||
(pull|pull\-requests|pr)[/-]: {} | ||
ignore: | ||
sha: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
version: '{build}' | ||
pull_requests: | ||
do_not_increment_build_number: true | ||
branches: | ||
only: | ||
- master | ||
- develop | ||
- /release\/*/ | ||
- /hotfix\/*/ | ||
skip_tags: true | ||
shallow_clone: false | ||
environment: | ||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | ||
DOTNET_CLI_TELEMETRY_OPTOUT: true | ||
VERSION_INFO_SEMVER: null | ||
VERSION_INFO: null | ||
nuget: | ||
project_feed: true | ||
disable_publish_on_pr: true | ||
init: | ||
before_build: | ||
- ps: >- | ||
$version_info_json = (gitversion /l console /output json); | ||
$version_info = (gitversion /output json | ConvertFrom-Json); | ||
$env:VERSION_INFO = $version_info; | ||
$env:VERSION_INFO_SEMVER = $version_info.SemVer; | ||
Update-AppveyorBuild -Version "$env:VERSION_INFO_SEMVER-$env:APPVEYOR_BUILD_NUMBER"; | ||
Write-Host "Get GitVersion output = " $version_info_json; | ||
Write-Host "Set VERSION_INFO_SEMVER = " $env:VERSION_INFO_SEMVER; | ||
Write-Host "Set APPVEYOR_BUILD_VERSION = " $env:APPVEYOR_BUILD_VERSION; | ||
build_script: | ||
- ps: .\build.ps1 | ||
test: off | ||
artifacts: | ||
- path: .\artifacts\*.nupkg | ||
name: NuGet | ||
- path: .\test-results\*.xml | ||
name: Xunit | ||
deploy: | ||
- provider: GitHub | ||
tag: ${VERSION_INFO_SEMVER} | ||
release: v${VERSION_INFO_SEMVER} | ||
auth_token: | ||
secure: JGXCP5ogwbyjc0iZqs8i6O/Znx87GbpVFF/Om9OAW9/6fNpygIspgaUDtnAWx1jD | ||
artifact: nothing | ||
draft: true | ||
on: | ||
branch: master | ||
- provider: NuGet | ||
api_key: | ||
secure: p3Sk0hJZF4uia94ka0L+0VY4VXB2CP188Rq0kky1/ZHvaHacb4LaXxEG7crELBxe | ||
skip_symbols: true | ||
artifact: NuGet | ||
on: | ||
branch: master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
// Addins | ||
#addin "nuget:?package=Cake.Incubator" | ||
|
||
// Tools | ||
#tool "xunit.runner.console" | ||
#tool "nuget:?package=GitVersion.CommandLine" | ||
|
||
// Parameters | ||
var configuration = Argument("Configuration", "Release"); | ||
var target = Argument("Target", "Default"); | ||
|
||
// Variables | ||
var outputDir = Directory("./artifacts"); | ||
var projectDir = GetFiles("./src/Postgres2Go/*.csproj").FirstOrDefault(); | ||
var solution = GetFiles("./src/*.sln").FirstOrDefault(); | ||
var tests = GetFiles("./src/Postgres2Go.Tests/*.csproj").FirstOrDefault(); | ||
var testResultsDir = Directory("./test-results/"); | ||
GitVersion versionInfo = null; | ||
|
||
|
||
// Tasks | ||
Task("Clean") | ||
.Does(() => { | ||
Information("Removing previous build artifacts"); | ||
if(DirectoryExists(testResultsDir.Path)) | ||
DeleteDirectory(testResultsDir.Path, | ||
new DeleteDirectorySettings() | ||
{ | ||
Recursive = true | ||
}); | ||
if(DirectoryExists(outputDir.Path)) | ||
DeleteDirectory(outputDir.Path, | ||
new DeleteDirectorySettings() | ||
{ | ||
Recursive = true | ||
}); | ||
}); | ||
|
||
Task("Prepare-Directories") | ||
.IsDependentOn("Clean") | ||
.Does(() => | ||
{ | ||
Information("Prepare directory for tests output"); | ||
EnsureDirectoryExists(testResultsDir.Path); | ||
Information("Prepare directory for lib output"); | ||
EnsureDirectoryExists(outputDir.Path); | ||
}); | ||
|
||
Task("Restore-NuGet-Packages") | ||
.IsDependentOn("Prepare-Directories") | ||
.Does(() => { | ||
Information("Restoring nuget packages for solution"); | ||
DotNetCoreRestore(solution.FullPath); | ||
}); | ||
|
||
Task("Get-Version-Info") | ||
.Does(() => { | ||
Information("Set artifacts version"); | ||
versionInfo = GitVersion( | ||
new GitVersionSettings { | ||
UpdateAssemblyInfo = true, | ||
OutputType = GitVersionOutput.Json | ||
}); | ||
Information("Version is: {0}", versionInfo.Dump()); | ||
}); | ||
|
||
Task("Build") | ||
.IsDependentOn("Restore-NuGet-Packages") | ||
.IsDependentOn("Get-Version-Info") | ||
.Does(() => { | ||
Information("Build solution"); | ||
DotNetCoreBuild(solution.FullPath, | ||
new DotNetCoreBuildSettings() | ||
{ | ||
Configuration = configuration, | ||
ArgumentCustomization = args => args | ||
.Append("--no-restore") | ||
.Append("/p:SemVer=" + versionInfo.NuGetVersion) , | ||
}); | ||
}); | ||
|
||
Task("Test") | ||
.IsDependentOn("Build") | ||
.Does(() => { | ||
var resultsFile = $"..\\..\\..\\test-results\\{tests.GetFilenameWithoutExtension()}.xml"; | ||
var testProject = tests.FullPath; | ||
Information($"Run tests of {tests.GetFilenameWithoutExtension()}"); | ||
DotNetCoreTest(testProject, | ||
new DotNetCoreTestSettings() | ||
{ | ||
Configuration = configuration, | ||
NoBuild = true, | ||
ArgumentCustomization = args => args | ||
.Append($"-r {testResultsDir.Path.FullPath}") | ||
.Append($"-l trx;logfilename={resultsFile}") | ||
}); | ||
}); | ||
|
||
Task("Pack") | ||
.IsDependentOn("Test") | ||
.Does(() => { | ||
Information("Creating nuget package"); | ||
DotNetCorePack( | ||
projectDir.GetDirectory().FullPath, | ||
new DotNetCorePackSettings() | ||
{ | ||
Configuration = configuration, | ||
IncludeSymbols = false, | ||
IncludeSource = false, | ||
NoBuild = true, | ||
NoRestore = true, | ||
OutputDirectory = outputDir.Path, | ||
Verbosity = DotNetCoreVerbosity.Minimal, | ||
ArgumentCustomization = args=> args | ||
.Append("/p:PackageVersion=" + versionInfo.NuGetVersion) | ||
}); | ||
}); | ||
|
||
Task("Default") | ||
.IsDependentOn("Pack"); | ||
|
||
// Run | ||
RunTarget(target); |
Oops, something went wrong.