Skip to content

Commit

Permalink
Added mising build files
Browse files Browse the repository at this point in the history
Updated build process
  • Loading branch information
ravensorb committed May 19, 2018
1 parent e25cf4e commit a3994ac
Show file tree
Hide file tree
Showing 13 changed files with 37 additions and 199 deletions.
23 changes: 8 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -255,24 +255,17 @@ paket-files/

# CodeRush
.cr/

# CAKE
tools/Addins/
tools/Cake/
tools/GitVersion.CommandLine*
tools/NUnit.ConsoleRunner*
tools/nuget.exe
tools/CredentialProvider.VSS.exe
tools/VSS.NuGet.AuthHelper.exe
tools/settingsUtils.cake
tools/versionUtils.cake
tools/VSS.NuGet.AuthHelper.exe
tools/packages.config.md5sum
tools/**
!tools/*.cake
!tools/nuget.exe
!tools/CredentialProvider.VSS.exe
!tools/VSS.NuGet.AuthHelper.exe

# GIT
/git.password
/nugetapi.key
git.password
nugetapi.key

# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
*.pyc
Binary file removed .nuget/CredentialProvider.VSS.exe
Binary file not shown.
Binary file not shown.
16 changes: 0 additions & 16 deletions .nuget/NuGet.Config

This file was deleted.

Binary file removed .nuget/NuGet.exe
Binary file not shown.
136 changes: 0 additions & 136 deletions .nuget/NuGet.targets

This file was deleted.

30 changes: 14 additions & 16 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Task("Restore")
{
Information("Restoring {0}...", solution);
if (!string.IsNullOrEmpty(settings.NuGet.NuGetConfig) && FileExists(settings.NuGet.NuGetConfig))
if (FileExists(settings.NuGet.NuGetConfig))
{
NuGetRestore(solution, new NuGetRestoreSettings { ConfigFile = settings.NuGet.NuGetConfig });
} else {
Expand All @@ -143,10 +143,14 @@ Task("Build")
{
Information("Building {0}", solution);
try {
DotNetBuild(solution, s =>
s.WithProperty("TreatWarningsAsErrors",settings.Build.TreatWarningsAsErrors.ToString())
.WithTarget("Build")
.SetConfiguration(settings.Configuration));
MSBuild(solution, configurator =>
configurator.SetConfiguration(settings.Configuration)
// .SetVerbosity(Verbosity.Minimal)
// .UseToolVersion(MSBuildToolVersion.VS2015)
// .SetMSBuildPlatform(MSBuildPlatform.x86)
// .SetPlatformTarget(PlatformTarget.MSIL)
);
}
catch (Exception ex)
{
Expand Down Expand Up @@ -281,22 +285,16 @@ Task("Nuget-Publish")
{
try
{
var ngps = new NuGetPushSettings {
NuGetPush(n, new NuGetPushSettings {
Source = settings.NuGet.FeedUrl,
ApiKey = settings.NuGet.FeedApiKey,
ConfigFile = settings.NuGet.NuGetConfig,
Verbosity = NuGetVerbosity.Normal
};
if (!string.IsNullOrEmpty(settings.NuGet.NuGetConfig) && FileExists(settings.NuGet.NuGetConfig))
{
ngps.ConfigFile = settings.NuGet.NuGetConfig;
}
NuGetPush(n, ngps);
});
}
catch (Exception ex)
{
Information("\tFailed to published: ", ex.ToString());
Information("\tFailed to published: ", ex.Message);
if (ex.Message.Contains("403")) { authError = true; }
}
Expand Down Expand Up @@ -329,7 +327,7 @@ Task("Nuget-UnPublish")
args = args + string.Format(" -ApiKey {0}", settings.NuGet.FeedApiKey);
//}
if (!string.IsNullOrEmpty(settings.NuGet.NuGetConfig) && FileExists(settings.NuGet.NuGetConfig)) {
if (!string.IsNullOrEmpty(settings.NuGet.NuGetConfig)) {
args = args + string.Format(" -Config {0}", settings.NuGet.NuGetConfig);
}
Expand Down
2 changes: 1 addition & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,6 @@ if ($Mono) { $cakeArguments += "-mono" }
$cakeArguments += $ScriptArgs

# Start Cake
Write-Host "Running build script... ($cakeArguments)"
Write-Host "Running build script..."
&$CAKE_EXE $cakeArguments
exit $LASTEXITCODE
17 changes: 8 additions & 9 deletions build.settings.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
{
"version": {
"VersionFile": "./build.version.json",
"AssemblyInfoFile": null,
"AssemblyInfoFile": "./src/AssemblyInfo.Shared.cs",
"LoadFrom": "versionfile",
"AutoIncrementVersion": false
},
"build": {
"SourcePath": "./src",
"SolutionFileSpec": "./*.sln",
"BuildOutPutPath": "",
"ArtifactsPath": "./artifacts/packages",
"ArtifactsPath": "./artifacts/app",
"TreatWarningsAsErrors": false
},
"xamarin": {
Expand All @@ -21,19 +20,19 @@
"test": {
"SourcePath": "./tests",
"ResultsPath": "./artifacts",
"AssemblyFileSpec": "*.Tests.dll",
"AssemblyFileSpec": "*.UnitTests.dll",
"Framework": "NUnit3"
},
"nuget": {
"NuGetConfig": "",
"FeedUrl": "https://www.nuget.org",
"FeedAPIKey": "NUGETAPIKEY",
"NuGetConfig": "./.nuget/NuGet.config",
"FeedUrl": "https://www.nuget.com",
"FeedAPIKey": "[NUGETAPIKEY]",
"ArtifactsPath": "./artifacts/packages",
"NuspecPath": "./nuspec",
"UpdateVersion": true,
"UpdateLibraryDependencies": true,
"UpdateLibraryDependencies": false,
"VersionDependencyForLibrary": "greaterthanorequal",
"LibraryNamespaceBase": "Invisionware.Collections",
"LibraryNamespaceBase": "",
"LibraryMinVersionDependency": ""
}
}
2 changes: 1 addition & 1 deletion build.version.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"Major":1,"Minor":1,"Build":4,"PreRelease":7,"ReleaseNotes":null,"Semantic":null,"Milestone":null,"CakeVersion":"0.25.0.0","IsPreRelease":true}
{"Major":1,"Minor":0,"Build":0,"PreRelease":0,"ReleaseNotes":null,"Semantic":null,"Milestone":null,"CakeVersion":"0.27.2.0","IsPreRelease":false}
2 changes: 1 addition & 1 deletion nuspec/Invisionware.Collections.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>Invisionware.Collections</id>
<version>1.1.4-pre07</version>
<version>1.0.0</version>
<title>Invisionware.Collections</title>
<authors>Invisionware</authors>
<owners>Invisionware</owners>
Expand Down
4 changes: 2 additions & 2 deletions src/AssemblyInfo.Shared.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.1.4")]
//[assembly: AssemblyFileVersion("1.1.4")]
[assembly: AssemblyVersion("1.0.0")]
//[assembly: AssemblyFileVersion("1.0.0")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
Expand Down
4 changes: 2 additions & 2 deletions tools/versionUtils.cake
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public class VersionUtils

if (!string.IsNullOrEmpty(assemblyInfoFile) || !context.FileExists(assemblyInfoFile))
{
context.Warning("AssemblyInfo file does not exist");
context.Error("AssemblyInfo file does not exist");
return null;
}

Expand All @@ -87,7 +87,7 @@ public class VersionUtils

private static VersionInfo LoadVersionFromGit(ICakeContext context)
{
context.Information("Fetching Version Info from Git");
context.Information("Fetching Verson Infop from Git");

try {
GitVersion assertedVersions = context.GitVersion(new GitVersionSettings
Expand Down

0 comments on commit a3994ac

Please sign in to comment.