Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add nuget target to build the nuget package.
  • Loading branch information
rgl authored and statianzo committed Oct 21, 2011
1 parent f11c317 commit b84b336
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
16 changes: 11 additions & 5 deletions Rakefile
Expand Up @@ -6,9 +6,10 @@ load 'VERSION.txt'

ROOT_NAMESPACE = 'Fleck'
PRODUCT = ROOT_NAMESPACE
COPYRIGHT = 'Copyright Jason Staten 2010-2011. All rights reserved.';
COMMON_ASSEMBLY_INFO = 'src/CommonAssemblyInfo.cs';
COMPILE_TARGET = 'Debug'
COPYRIGHT = 'Copyright Jason Staten 2010-2011. All rights reserved.'
DESCRIPTION = 'C# WebSocket Implementation'
COMMON_ASSEMBLY_INFO = 'src/CommonAssemblyInfo.cs'
COMPILE_TARGET = ENV['COMPILE_TARGET'] || 'Debug'
COMPILE_PLATFORM = 'Any CPU'
CLR_TOOLS_VERSION = 'v4.0.30319'
BUILD_RUNNER = Platform.nix? ? 'xbuild' : 'msbuild'
Expand Down Expand Up @@ -44,7 +45,7 @@ assemblyinfo :version do |asm|
puts "Version: #{BUILD_NUMBER}" if tc_build_number.nil?
asm.trademark = commit
asm.product_name = PRODUCT
asm.description = BUILD_NUMBER
asm.description = DESCRIPTION
asm.version = asm_version
asm.file_version = BUILD_NUMBER
asm.custom_attributes :AssemblyInformationalVersion => asm_version
Expand All @@ -56,7 +57,7 @@ desc 'Prepares the working directory for a new build'
task :clean do
Rake::Task["clean:#{BUILD_RUNNER}"].execute
rm_r ARCHIVE_DIR if Dir.exists?(ARCHIVE_DIR)
rm_r RESULTS_DIR if Dir.exists?(RESULTS_DIR)
rm_r RESULTS_DIR if Dir.exists?(RESULTS_DIR)
mkdir_p ARCHIVE_DIR
mkdir_p RESULTS_DIR
end
Expand Down Expand Up @@ -100,6 +101,11 @@ namespace :compile do
end
end

desc 'Build the nuget package'
task :nuget => [:build] do
sh "nuget pack -OutputDirectory #{ARCHIVE_DIR} -Properties Configuration=#{COMPILE_TARGET} src/#{ROOT_NAMESPACE}/#{ROOT_NAMESPACE}.csproj"
end

desc 'Run tests'
task :test do
runner = Dir['**/nunit-console.exe'].first
Expand Down
14 changes: 14 additions & 0 deletions src/Fleck/Fleck.nuspec
@@ -0,0 +1,14 @@
<?xml version="1.0"?>
<package>
<metadata>
<id>$id$</id>
<version>$version$</version>
<authors>statianzo</authors>
<owners>rgl</owners>
<language>en-US</language>
<licenseUrl>http://www.opensource.org/licenses/mit-license.php</licenseUrl>
<projectUrl>https://github.com/statianzo/Fleck</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>$description$</description>
</metadata>
</package>

0 comments on commit b84b336

Please sign in to comment.