Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Cake for build and overhaul/cleanup build #1589

Merged
merged 4 commits into from
Jan 21, 2017
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
13 changes: 1 addition & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
build/
/_build/
/.vs/
Screenshots/
packages/
CKAN/*/bin
CKAN/*/obj
Tests/bin
Tests/obj
test-results
*.userprefs
*.csproj.user
*.user
TestResult.xml
StyleCop.Cache
ckan.exe
ks2ckan.exe
netkan.exe
*.exe.config
*.exe.mdb
.*.swp
.fatten.out
*.resources
Expand Down
35 changes: 12 additions & 23 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,20 @@ language: csharp

sudo: required

env:
- BUILD_CONFIGURATION=Debug
- BUILD_CONFIGURATION=Release

mono:
- latest
- 4.6.2
- 4.2.4
- 4.0.5
- 3.12.0
- 3.10.0

addons:
apt:
packages:
- git
- mono-devel
- nunit-console
- libtest-most-perl
- libipc-system-simple-perl
- ca-certificates

# These commands simulate having a graphical display, which is needed
Expand All @@ -25,31 +24,21 @@ before_install:
- "export DISPLAY=:99.0"
- sh -e /etc/init.d/xvfb start

install:
- nuget restore CKAN.sln

script:
- bin/build
- nunit-console --exclude=FlakyNetwork build/Tests/bin/Debug/CKAN.Tests.dll
- prove # Run all the tests in t/

before_deploy:
# S3 doesn't support file for some reason, so we have to put things in
# a directory
- mkdir uploads
- cp *.exe uploads
- ./build --configuration=$BUILD_CONFIGURATION
- ./build test+only --configuration=$BUILD_CONFIGURATION --exclude=FlakyNetwork

deploy:
# Releases (which are tagged) go to github
- provider: releases
api_key:
secure: AjwbRLStNJZb9hAOLfRLK85KlFo2q2Dr1NKCoDS4elek1nqSiOjL1hH0kDgUMx/PJqQVnFU8tbJPL30t9Pj7jcJhp0LhbbPipQE3TCSpafTneSEbdz5HT+OdghWCZhUhfs07wGNTFUwcAO4WBZ7wv1AnfdfogHdA5RMdykiIl38=
file:
- ckan.exe
- _build/repack/$BUILD_CONFIGURATION/ckan.exe
on:
repo: KSP-CKAN/CKAN
tags: true
condition: $(mono --version | perl -ne'/version (\S+)/ and print $1') = 3.10.0
condition: $BUILD_CONFIGURATION = Release && $(mono --version | perl -ne'/version (\S+)/ and print $1') = 4.6.2
# all_branches needed as a workaround for travis-ci#1675
all_branches: true

Expand All @@ -62,12 +51,12 @@ deploy:
bucket: ckan-travis
acl: public_read
skip_cleanup: true
local_dir: uploads
local_dir: _build/repack/$BUILD_CONFIGURATION
on:
repo: KSP-CKAN/CKAN
branch: master
condition: $(mono --version | perl -ne'/version (\S+)/ and print $1') = 3.10.0
condition: $BUILD_CONFIGURATION = Release && $(mono --version | perl -ne'/version (\S+)/ and print $1') = 4.6.2

notifications:
irc:
channels:
Expand Down
14 changes: 10 additions & 4 deletions AutoUpdate/CKAN-autoupdate.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@
<AssemblyName>AutoUpdater</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<OutputPath>..\_build\out\$(AssemblyName)\$(Configuration)\bin\</OutputPath>
<IntermediateOutputPath>..\_build\out\$(AssemblyName)\$(Configuration)\obj\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand All @@ -26,25 +27,30 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.5\lib\net45-full\log4net.dll</HintPath>
<HintPath>..\_build\lib\nuget\log4net.2.0.5\lib\net45-full\log4net.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<HintPath>..\_build\lib\nuget\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\_build\meta\GlobalAssemblyVersionInfo.cs">
<Link>Properties\GlobalAssemblyVersionInfo.cs</Link>
</Compile>
<Compile Include="..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Main.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
Expand Down
34 changes: 1 addition & 33 deletions AutoUpdate/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,36 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("AutoUpdater")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("AutoUpdater")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// 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
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("5e88dc18-097d-4a5b-a941-cb836effb1f8")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyDescription("CKAN Auto-update Executable")]
5 changes: 0 additions & 5 deletions AutoUpdate/build.sh

This file was deleted.

2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

All notable changes to this project will be documented in this file.

## Unreleased
## v1.22.2-dev

### Bugfixes
- [CLI] Removed non-functioning code on available command (#1966 by: poltas; reviewed: dbent)
Expand Down
42 changes: 21 additions & 21 deletions CKAN.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
VisualStudioVersion = 14.0.22823.1
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CKAN-core", "Core\CKAN-core.csproj", "{3B9AEA22-FA3B-4E43-9283-EABDD81CF271}"
EndProject
Expand All @@ -23,28 +23,31 @@ Global
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3B9AEA22-FA3B-4E43-9283-EABDD81CF271}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3B9AEA22-FA3B-4E43-9283-EABDD81CF271}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3B9AEA22-FA3B-4E43-9283-EABDD81CF271}.Release|Any CPU.ActiveCfg = Debug|Any CPU
{3B9AEA22-FA3B-4E43-9283-EABDD81CF271}.Release|Any CPU.Build.0 = Debug|Any CPU
{4336F356-33DB-442A-BF74-5E89AF47A5B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4336F356-33DB-442A-BF74-5E89AF47A5B9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4336F356-33DB-442A-BF74-5E89AF47A5B9}.Release|Any CPU.ActiveCfg = Debug|Any CPU
{4336F356-33DB-442A-BF74-5E89AF47A5B9}.Release|Any CPU.Build.0 = Debug|Any CPU
{4F41255E-8BC1-465B-82D5-1C5665BC099A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4F41255E-8BC1-465B-82D5-1C5665BC099A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4F41255E-8BC1-465B-82D5-1C5665BC099A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4F41255E-8BC1-465B-82D5-1C5665BC099A}.Release|Any CPU.Build.0 = Release|Any CPU
{A79F9D54-315C-472B-928F-713A5860B2BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A79F9D54-315C-472B-928F-713A5860B2BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A79F9D54-315C-472B-928F-713A5860B2BE}.Release|Any CPU.ActiveCfg = Debug|Any CPU
{A79F9D54-315C-472B-928F-713A5860B2BE}.Release|Any CPU.Build.0 = Debug|Any CPU
{3B9AEA22-FA3B-4E43-9283-EABDD81CF271}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3B9AEA22-FA3B-4E43-9283-EABDD81CF271}.Release|Any CPU.Build.0 = Release|Any CPU
{E5B1C768-349E-4DAF-A134-56E4ECF1EEEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E5B1C768-349E-4DAF-A134-56E4ECF1EEEF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E5B1C768-349E-4DAF-A134-56E4ECF1EEEF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E5B1C768-349E-4DAF-A134-56E4ECF1EEEF}.Release|Any CPU.Build.0 = Release|Any CPU
{E97D81F6-85E2-4F1F-906D-BE21766602E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E97D81F6-85E2-4F1F-906D-BE21766602E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E97D81F6-85E2-4F1F-906D-BE21766602E5}.Release|Any CPU.ActiveCfg = Debug|Any CPU
{E97D81F6-85E2-4F1F-906D-BE21766602E5}.Release|Any CPU.Build.0 = Debug|Any CPU
{E97D81F6-85E2-4F1F-906D-BE21766602E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E97D81F6-85E2-4F1F-906D-BE21766602E5}.Release|Any CPU.Build.0 = Release|Any CPU
{A79F9D54-315C-472B-928F-713A5860B2BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A79F9D54-315C-472B-928F-713A5860B2BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A79F9D54-315C-472B-928F-713A5860B2BE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A79F9D54-315C-472B-928F-713A5860B2BE}.Release|Any CPU.Build.0 = Release|Any CPU
{4336F356-33DB-442A-BF74-5E89AF47A5B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4336F356-33DB-442A-BF74-5E89AF47A5B9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4336F356-33DB-442A-BF74-5E89AF47A5B9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4336F356-33DB-442A-BF74-5E89AF47A5B9}.Release|Any CPU.Build.0 = Release|Any CPU
{4F41255E-8BC1-465B-82D5-1C5665BC099A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4F41255E-8BC1-465B-82D5-1C5665BC099A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4F41255E-8BC1-465B-82D5-1C5665BC099A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4F41255E-8BC1-465B-82D5-1C5665BC099A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
Policies = $0
Expand Down Expand Up @@ -81,7 +84,4 @@ Global
$2.inheritsScope = text/x-csharp
$2.scope = text/x-csharp
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
2 changes: 1 addition & 1 deletion Cmdline/Action/Install.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public int RunCommand(CKAN.KSP ksp, object raw_options)
"Owning Mod : {2}\r\n" +
"CKAN Version : {3}\r\n",
ex.filename, ex.installingModule, ex.owningModule,
Meta.Version()
Meta.GetVersion(VersionFormat.Full)
);
}
else
Expand Down
2 changes: 1 addition & 1 deletion Cmdline/Action/Upgrade.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public int RunCommand(CKAN.KSP ksp, object raw_options)
User.RaiseMessage("Querying the latest CKAN version");
AutoUpdate.Instance.FetchLatestReleaseInfo();
var latestVersion = AutoUpdate.Instance.LatestVersion;
var currentVersion = new Version(Meta.Version());
var currentVersion = new Version(Meta.GetVersion(VersionFormat.Short));

if (latestVersion.IsGreaterThan(currentVersion))
{
Expand Down
36 changes: 29 additions & 7 deletions Cmdline/CKAN-cmdline.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand All @@ -8,31 +9,52 @@
<RootNamespace>CKAN.CmdLine</RootNamespace>
<AssemblyName>CmdLine</AssemblyName>
<StartupObject>CKAN.CmdLine.MainClass</StartupObject>
<ApplicationIcon>..\GUI\assets\ckan.ico</ApplicationIcon>
<ApplicationIcon>..\assets\ckan.ico</ApplicationIcon>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile />
<OutputPath>..\_build\out\$(AssemblyName)\$(Configuration)\bin\</OutputPath>
<IntermediateOutputPath>..\_build\out\$(AssemblyName)\$(Configuration)\obj\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DebugSymbols>true</DebugSymbols>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="CommandLine">
<HintPath>..\Core\packages\CommandLineParser.1.9.71\lib\net40\CommandLine.dll</HintPath>
<HintPath>..\_build\lib\nuget\CommandLineParser.1.9.71\lib\net40\CommandLine.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a">
<HintPath>..\_build\lib\nuget\log4net.2.0.5\lib\net45-full\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Transactions" />
<Reference Include="log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a">
<HintPath>..\packages\log4net.2.0.5\lib\net45-full\log4net.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed">
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<HintPath>..\_build\lib\nuget\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\_build\meta\GlobalAssemblyVersionInfo.cs">
<Link>Properties\GlobalAssemblyVersionInfo.cs</Link>
</Compile>
<Compile Include="..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Action\Compare.cs" />
<Compile Include="Action\CompatSubCommand.cs" />
<Compile Include="ConsoleUser.cs" />
Expand Down
Loading