Created
August 30, 2011 21:36
-
-
Save prabirshrestha/1182130 to your computer and use it in GitHub Desktop.
Sample Jake File using nJake
This file contains hidden or 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
| var n = require('./Build/nJake/nJake'), | |
| path = require('path'), | |
| root = path.normalize(path.join(__dirname, '/')); | |
| n.options.msbuild.version = 'net40'; | |
| msbuild_config = 'Release'; | |
| var version = { full: '5.2.0.0' }; | |
| namespace('build', function () { | |
| /*n.exec('net40', [], { command: 'node', parameters: [ '-v' ] } , function(exitCode) {*/ | |
| //console.log('exit code: ' + exitCode); | |
| /*});*/ | |
| desc('Build .NET 4 binaries'); | |
| n.msbuild('net40', ['clean:net40'], { | |
| file : path.join(root, 'Source/Facebook-Net40.sln'), | |
| version: 'net40', | |
| targets: ['Build'], | |
| properties: { Configuration : msbuild_config } | |
| }); | |
| desc('Build .NET 3.5 binaries'); | |
| n.msbuild('net35', ['clean:net35'], { | |
| file: path.join(root, 'Source/Facebook-Net35.sln'), | |
| version: 'net35', | |
| targets: ['Build'], | |
| properties: { Configuration: msbuild_config } | |
| }); | |
| desc('Build Silverlight 4 binaries'); | |
| n.msbuild('sl4', ['clean:sl4'], { | |
| file: path.join(root, 'Source/Facebook-SL4.sln'), | |
| version: 'net40', | |
| targets: ['Build'], | |
| properties: { Configuration: msbuild_config } | |
| }); | |
| desc('Build Windows Phone 7 binaries'); | |
| n.msbuild('wp7', ['clean:wp7'], { | |
| file: path.join(root, 'Source/Facebook-WP7.sln'), | |
| version: 'net40', | |
| targets: ['Build'], | |
| properties: { Configuration: msbuild_config } | |
| }); | |
| desc('Build documentation files'); | |
| task('docs', [], function () { | |
| }); | |
| task('all', ['build:net40','build:net35','build:sl4','build:wp7']); | |
| }); | |
| task('build', ['build:all']); | |
| namespace('clean', function () { | |
| n.msbuild('net40', [], { | |
| file: path.join(root, 'Source/Facebook-Net40.sln'), | |
| version: 'net40', | |
| targets: ['Clean'], | |
| properties: { Configuration: msbuild_config } | |
| }); | |
| n.msbuild('net35', [], { | |
| file: path.join(root, 'Source/Facebook-Net35.sln'), | |
| version: 'net35', | |
| targets: ['Clean'], | |
| properties: { Configuration: msbuild_config } | |
| }); | |
| n.msbuild('sl4', [], { | |
| file: path.join(root, 'Source/Facebook-SL4.sln'), | |
| version: 'net40', | |
| targets: ['Clean'], | |
| properties: { Configuration: msbuild_config } | |
| }); | |
| n.msbuild('wp7', [], { | |
| file: path.join(root, 'Source/Facebook-WP7.sln'), | |
| version: 'net40', | |
| targets: ['Clean'], | |
| properties: { Configuration: msbuild_config } | |
| }); | |
| task('all', ['clean:net40','clean:net35','clean:sl4','clean:wp7']); | |
| }); | |
| task('clean', ['clean:all']); | |
| namespace('tests', function () { | |
| task('facebook', [], function () { | |
| }); | |
| task('facebookweb', [], function () { | |
| }); | |
| namespace('sl4', function () { | |
| task('facebook', [], function () { | |
| }); | |
| }); | |
| }); | |
| namespace('assemblyinfo', function () { | |
| n.assemblyInfo('facebook', [], { | |
| file: path.join(root, 'Source/Facebook/Properties/AssemblyInfo.cs'), | |
| namespaces: [], | |
| attributes : { | |
| AssemblyTitle: version.full, | |
| AssemblyDescription: 'Thuzi LLC', | |
| AssemblyCompany: 'Microsoft Public License (Ms-PL)', | |
| AssemblyProduct: 'Facebook C# SDK', | |
| ComVisible: false | |
| } | |
| }); | |
| }); | |
| namespace('nuspec', function () { | |
| namespace('nuget', function () { | |
| n.nuspec('facebook', [], { | |
| file: path.join(root, 'Build/NuGet/Facebook/Facebook.nuspec'), | |
| nuspec: { | |
| 'package': { | |
| _xmlns: 'http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd', | |
| metadata: { | |
| id: 'Facebook', | |
| version: version.full, | |
| authors: 'Jim Jimmerman, Nathan Totten, Prabir Shrestha', | |
| description: 'The Facebook C# SDK Core.', | |
| language: 'en-US', | |
| licenseUrl: 'http://facebooksdk.codeplex.com/license', | |
| projectUrl: 'http://facebooksdk.codeplex.com', | |
| iconUrl: 'http://bit.ly/facebooksdkicon', | |
| requireLicenseAcceptance: true, | |
| tags: 'Facebook', | |
| dependencies: [ | |
| { dependency: { _id: 'CodeContracts.Unofficial', _version: '1.0.0.2'} } | |
| ] | |
| }, | |
| files: [ | |
| { file: { _src: '../../Build/NuGet/Facebook/content/**/*.*', _target: 'content'} }, | |
| { file: { _src: '../../Build/NuGet/Facebook/serializers/**/*.*', _target: 'serializers'} }, | |
| { file: { _src: '../../Build/NuGet/Facebook/tools/**/*', _target: 'tools'} }, | |
| { file: { _src: '../../Bin/Release/net40-client/**/*.dll', _target: 'lib/net40-client'} }, | |
| { file: { _src: '../../Bin/Release/net40-client/**/*.xml', _target: 'lib/net40-client'} }, | |
| { file: { _src: '../../Bin/Release/net35-client/**/*.dll', _target: 'lib/net35-client'} }, | |
| { file: { _src: '../../Bin/Release/net35-client/**/*.xml', _target: 'lib/net35-client'} }, | |
| { file: { _src: '../../Bin/Release/sl4/**/*.dll', _target: 'lib/sl4'} }, | |
| { file: { _src: '../../Bin/Release/sl4/**/*.xml', _target: 'lib/sl4'} }, | |
| { file: { _src: '../../Bin/Release/sl3-wp/**/*.dll', _target: 'lib/sl4'} }, | |
| { file: { _src: '../../Bin/Release/sl3-wp/**/*.xml', _target: 'lib/sl3-wp'} }, | |
| ] | |
| } | |
| } | |
| }); | |
| }); | |
| }); | |
| namespace('nuget', function () { | |
| task('pack', [], function () { | |
| }); | |
| task('push_source', [], function () { | |
| }); | |
| task('push', [], function () { | |
| }); | |
| task('publish', [], function () { | |
| }); | |
| }); | |
| namespace('zip', function() { | |
| desc('Create zip archive of the library files'); | |
| task('libs', [], function () { | |
| }); | |
| desc('Create zip archive of the source files'); | |
| task('source', [], function () { | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment