Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 3 additions & 19 deletions Build/default.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@ properties {
$GitVersionExe = "$BaseDirectory\Lib\GitVersion.exe"
$ArtifactsDirectory = "$BaseDirectory\Artifacts"

$NuGetPushSource = ""

$MsBuildLoggerPath = ""
$Branch = ""
$MsTestPath = "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\MSTest.exe"
$RunTests = $false
}

task default -depends Clean, ApplyAssemblyVersioning, ApplyPackageVersioning, RestoreNugetPackages, Compile, RunTests, BuildZip, BuildJsonPackage, PublishToMyget
task default -depends Clean, ApplyAssemblyVersioning, ApplyPackageVersioning, RestoreNugetPackages, Compile, RunTests, BuildZip, BuildJsonPackage

task Clean {
Get-ChildItem $PackageDirectory *.nupkg | foreach { Remove-Item $_.FullName }
Expand Down Expand Up @@ -96,11 +94,11 @@ task RunTests -precondition { return $RunTests -eq $true } {

task BuildZip {
TeamCity-Block "Zipping up the binaries" {
$assembly = Get-ChildItem -Path "$ArtifactsDirectory\Lib" -Filter FluentAssertions.dll -Recurse | Select-Object -first 1
$assembly = Get-ChildItem -Path "$ArtifactsDirectory\Json\Lib" -Filter FluentAssertions.dll -Recurse | Select-Object -first 1

$versionNumber = $assembly.VersionInfo.FileVersion

& $7zip a -r "$ArtifactsDirectory\Fluent.Assertions.$versionNumber.zip" "$ArtifactsDirectory\Lib\*" -y
& $7zip a -r "$ArtifactsDirectory\Fluent.Assertions.Json.$versionNumber.zip" "$ArtifactsDirectory\Json\Lib\*" -y
}
}

Expand All @@ -110,19 +108,5 @@ task BuildJsonPackage -depends ExtractVersionsFromGit {
}
}

task PublishToMyget -precondition { return $env:NuGetApiKey } {
TeamCity-Block "Publishing NuGet Package to Myget" {
$packages = Get-ChildItem $ArtifactsDirectory *.nupkg

foreach ($package in $packages) {

if ($NuGetPushSource) {
& $Nuget push $package.FullName $env:NuGetApiKey -Source "$NuGetPushSource"
} else {
& $Nuget push $package.FullName $env:NuGetApiKey
}
}
}
}


4 changes: 2 additions & 2 deletions Src/FluentAssertions.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<projectUrl>http://www.fluentassertions.com</projectUrl>
<dependencies>
<group>
<dependency id="FluentAssertions" version="$Version$" />
<dependency id="FluentAssertions" version="[4.0.0,)" />
<dependency id="Newtonsoft.Json" version="[6.0.7,)" />
</group>
<group targetFramework="netstandard1.3">
<dependency id="FluentAssertions" version="$Version$" />
<dependency id="FluentAssertions" version="[4.0.0,)" />
<dependency id="Newtonsoft.Json" version="[9.0.1,)" />
</group>
</dependencies>
Expand Down