From b590241314b388a97ad9ee69c3424b1431baa74f Mon Sep 17 00:00:00 2001 From: Corey Kaylor Date: Mon, 16 May 2016 10:35:51 -0700 Subject: [PATCH] Updated paket for recommended setup --- .gitignore | 5 +++-- rakefile.rb | 37 +++++++++++++++++++++++++------------ 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index aaa1c5ab67..14acc266e8 100644 --- a/.gitignore +++ b/.gitignore @@ -201,8 +201,9 @@ FakesAssemblies/ artifacts src/CommonAssemblyInfo.cs -paket.lock +paket.exe +.idea/ *.DotSettings -/results \ No newline at end of file +/results diff --git a/rakefile.rb b/rakefile.rb index 36eccb4ca0..14a9719f87 100644 --- a/rakefile.rb +++ b/rakefile.rb @@ -64,7 +64,6 @@ end end - desc 'Runs the Mocha tests' task :mocha do sh "npm install" @@ -72,9 +71,7 @@ end desc 'Compile the code' -task :compile => [:clean] do - sh "paket.exe install" - +task :compile => [:clean, 'paket:restore'] do msbuild = '"C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe"' sh "#{msbuild} src/Marten.sln /property:Configuration=#{COMPILE_TARGET} /v:m /t:rebuild /nr:False /maxcpucount:2" @@ -86,12 +83,6 @@ end -desc 'Build the Nupkg file' -task :pack => [:compile] do - sh "paket.exe pack output artifacts version #{BUILD_NUMBER}" -end - - desc 'Run the unit tests' task :test => [:compile] do Dir.mkdir RESULTS_DIR @@ -120,8 +111,30 @@ end desc "Launches the documentation project in editable mode" -task :docs do - sh "paket.exe restore" +task :docs => ['paket:restore'] do sh "packages/Storyteller/tools/st.exe doc-run -v #{BUILD_VERSION}" end +namespace :paket do + desc 'Pulls the latest paket.exe into .paket folder' + task :bootstrap do + sh '.paket/paket.bootstrapper.exe' unless File.exists? '.paket/paket.exe' + end + + desc 'Restores nuget packages with paket' + task :restore do + sh '.paket/paket.exe restore' + end + + desc 'Setup paket.exe symlink for convenience (requires elevation)' + task :symlink do + sh '.paket/paket.bootstrapper.exe' + sh 'cmd.exe /c mklink .\paket.exe .paket\paket.exe' + end + + desc 'Build the Nupkg file' + task :pack => [:compile] do + sh ".paket/paket.exe pack output artifacts version #{BUILD_NUMBER}" + end +end +