Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Script does clean, compile, unit test run, and NuGet packaging - Introduce a SharedAssemblyInfo file that can be generated by the build script for sharing common assembly information across projects (including version number) - Also added a unit tests project with a dummy test to prove that test running was working
- Loading branch information
1 parent
7f21a22
commit d819985
Showing
77 changed files
with
11,753 additions
and
350 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Ignore build output folders | ||
[Tt]estresults/ | ||
[Pp]ackages/ |
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,2 @@ | ||
@echo off | ||
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe build.proj /v:m %* |
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 |
---|---|---|
@@ -1,17 +1,24 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd"> | ||
<metadata> | ||
<id>CassandraCSharpDriver</id> | ||
<version>2.0.1</version> | ||
<title>Datastax C# Driver for Apache Cassandra</title> | ||
<authors>Datastax</authors> | ||
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl> | ||
<projectUrl>https://github.com/datastax/csharp-driver</projectUrl> | ||
<requireLicenseAcceptance>true</requireLicenseAcceptance> | ||
<description>A C# client driver for Apache Cassandra. This driver works exclusively with | ||
the Cassandra Query Language version 3 (CQL3) and the CQL Native Protocol available from Cassandra 1.2.</description> | ||
<releaseNotes /> | ||
<copyright>Copyright (C) 2013 DataStax Inc.</copyright> | ||
<tags>cassandra apache datastax driver database nosql</tags> | ||
</metadata> | ||
<metadata> | ||
<id>CassandraCSharpDriver</id> | ||
<version>2.0.1</version> | ||
<title>Datastax C# Driver for Apache Cassandra</title> | ||
<authors>Datastax</authors> | ||
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl> | ||
<projectUrl>https://github.com/datastax/csharp-driver</projectUrl> | ||
<requireLicenseAcceptance>true</requireLicenseAcceptance> | ||
<description> | ||
A C# client driver for Apache Cassandra. This driver works exclusively with the Cassandra Query Language version 3 (CQL3) and the CQL Native Protocol available from Cassandra 1.2. | ||
</description> | ||
<releaseNotes /> | ||
<copyright>Copyright (C) 2013 DataStax Inc.</copyright> | ||
<tags>cassandra apache datastax driver database nosql</tags> | ||
</metadata> | ||
<files> | ||
<file src="Cassandra\bin\Release\Cassandra.*" target="lib\net40" /> | ||
<file src="Cassandra.Data\bin\Release\Cassandra.Data.*" target="lib\net40" /> | ||
<file src="Cassandra.Data.Linq\bin\Release\Cassandra.Data.Linq.*" target="lib\net40" /> | ||
<file src="Cassandra.DSE\bin\Release\Cassandra.DSE.*" target="lib\net40" /> | ||
</files> | ||
</package> |
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,3 @@ | ||
@echo off | ||
call build.bat | ||
pause |
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,102 @@ | ||
<Project DefaultTargets="local" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<!-- Add some tasks from MSBuild Community Tasks project --> | ||
<UsingTask AssemblyFile="$(MSBuildCommunityTasksLib)" TaskName="MSBuild.Community.Tasks.Git.GitVersion" /> | ||
<UsingTask AssemblyFile="$(MSBuildCommunityTasksLib)" TaskName="MSBuild.Community.Tasks.AssemblyInfo" /> | ||
|
||
<PropertyGroup> | ||
<!-- Define some base paths --> | ||
<BaseFolder>..</BaseFolder> | ||
<SourceFolder>$(BaseFolder)\src</SourceFolder> | ||
<ToolsFolder>$(BaseFolder)\tools</ToolsFolder> | ||
<BuildFolder>$(BaseFolder)\build</BuildFolder> | ||
|
||
<!-- Paths for build output --> | ||
<TestResultsFolder>$(BuildFolder)\testresults</TestResultsFolder> | ||
<PackagesFolder>$(BuildFolder)\packages</PackagesFolder> | ||
|
||
<!-- Specific Tools --> | ||
<NuGet>$(ToolsFolder)\nuget.exe</NuGet> | ||
<NUnit>$(SourceFolder)\packages\NUnit.Runners.2.6.3\tools\nunit-console.exe</NUnit> | ||
<MSBuildCommunityTasksLib>$(ToolsFolder)\MSBuildTasks.1.4.0.65\MSBuild.Community.Tasks.dll</MSBuildCommunityTasksLib> | ||
|
||
<!-- Other properties --> | ||
<Version>2.0.1</Version> | ||
<SharedAssemblyInfo>$(SourceFolder)\SharedAssemblyInfo.cs</SharedAssemblyInfo> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<!-- Projects to Build --> | ||
<AllProjects Include="$(SourceFolder)\**\*.csproj" /> | ||
|
||
<!-- NuGet spec files which will be used to create packages --> | ||
<NuSpecFiles Include="$(BuildFolder)\*.nuspec" /> | ||
</ItemGroup> | ||
|
||
<!-- | ||
These are the top level targets, meant to be invoked by msbuild. Ways to invoke: | ||
local - runs the build and unit tests | ||
full - runs local, plus does packaging (useful if testing packaging) | ||
ci - runs full, plus updates assemblies with a shared version number (meant to be run from a CI server) | ||
--> | ||
<Target Name="local" DependsOnTargets="compile;test" /> | ||
<Target Name="full" DependsOnTargets="local;package" /> | ||
<Target Name="ci" DependsOnTargets="generate_assembly_info;full"/> | ||
|
||
<!-- Cleans output folders, projects --> | ||
<Target Name="clean"> | ||
<Message Text="Cleaning build output folders" Importance="high" /> | ||
<RemoveDir Directories="$(TestResultsFolder)" ContinueOnError="true" /> | ||
<RemoveDir Directories="$(PackagesFolder)" ContinueOnError="true" /> | ||
|
||
<Message Text="Cleaning projects" Importance="high" /> | ||
<MSBuild Projects="@(AllProjects)" Targets="clean" StopOnFirstFailure="true" Properties="Configuration=Release" /> | ||
</Target> | ||
|
||
<!-- Compiles code --> | ||
<Target Name="compile" DependsOnTargets="clean"> | ||
<Message Text="Compiling projects" Importance="high" /> | ||
<MSBuild Projects="@(AllProjects)" Targets="build" StopOnFirstFailure="true" Properties="Configuration=Release" /> | ||
</Target> | ||
|
||
<!-- Creates nuget package(s) --> | ||
<Target Name="package" DependsOnTargets="compile"> | ||
<Message Text="Creating NuGet package(s)" Importance="high" /> | ||
<MakeDir Directories="$(PackagesFolder)" /> | ||
<Exec Command="$(NuGet) pack %(NuSpecFiles.FullPath) -basepath $(SourceFolder) -o $(PackagesFolder) -version $(Version) -symbols" /> | ||
</Target> | ||
|
||
<!-- Runs unit tests --> | ||
<Target Name="test" DependsOnTargets="compile"> | ||
<Message Text="Running unit tests" Importance="high" /> | ||
<MakeDir Directories="$(TestResultsFolder)" /> | ||
<Exec Command="$(NUnit) $(SourceFolder)\Cassandra.Tests\bin\Release\Cassandra.Tests.dll /labels /nologo /framework=net-4.0 /xml="$(TestResultsFolder)\Cassandra.Tests.xml" /out="$(TestResultsFolder)\Cassandra.Tests.txt"" /> | ||
</Target> | ||
|
||
<!-- Creates a shared assembly info file so that all assemblies get some common attributes (like version number) --> | ||
<Target Name="generate_assembly_info"> | ||
<PropertyGroup> | ||
<GitHash /> | ||
</PropertyGroup> | ||
|
||
<!-- Require that the BUILD_NUMBER environment variable is present (should be set automatically by Jenkins) --> | ||
<Error Condition="$(BUILD_NUMBER) == ''" Text="The BUILD_NUMBER environment variable is not set." /> | ||
|
||
<!-- Get the Git commit hash and put it into the GitHash property --> | ||
<GitVersion LocalPath="$(MSBuildProjectDirectory)"> | ||
<Output TaskParameter="CommitHash" PropertyName="GitHash" /> | ||
</GitVersion> | ||
|
||
<!-- Generate the shared assembly info file --> | ||
<AssemblyInfo | ||
OutputFile="$(SharedAssemblyInfo)" | ||
CodeLanguage ="CS" | ||
AssemblyCompany="DataStax" | ||
AssemblyProduct="Cassandra .NET Driver" | ||
ComVisible="false" | ||
AssemblyCopyright="Copyright © $([System.DateTime]::UtcNow.Year) by DataStax" | ||
AssemblyVersion="$(Version)" | ||
AssemblyInformationalVersion="$(Version) (git $(GitHash))" | ||
AssemblyFileVersion="$(Version).$(BUILD_NUMBER)" /> | ||
</Target> | ||
|
||
</Project> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="NUnit.Runners" version="2.6.3" /> | ||
</packages> |
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 |
---|---|---|
@@ -1,36 +1,9 @@ | ||
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("Cassandra.Data")] | ||
[assembly: AssemblyDescription("Datastax C# DSE Extensions for Apache Cassandra")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("Datastax")] | ||
[assembly: AssemblyProduct("CassandraCSharpDriver")] | ||
[assembly: AssemblyCopyright("Copyright (coffee) Datastax 2012")] | ||
[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)] | ||
// See the SharedAssemblyInfo.cs file for information shared by all assemblies | ||
[assembly: AssemblyTitle("Cassandra.DSE")] | ||
[assembly: AssemblyDescription("DataStax .NET DSE Extensions for Apache Cassandra")] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("064f850a-21d3-4671-9e57-cb9b90db717c")] | ||
|
||
// 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("2.0.1.0")] | ||
[assembly: AssemblyFileVersion("2.0.1.0")] | ||
[assembly: Guid("064f850a-21d3-4671-9e57-cb9b90db717c")] |
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
Oops, something went wrong.