• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
AlamoCoders May 09 - Rake
 

AlamoCoders May 09 - Rake

on

  • 796 views

Rake 101 for .NET developers.

Rake 101 for .NET developers.

Statistics

Views

Total Views
796
Views on SlideShare
794
Embed Views
2

Actions

Likes
0
Downloads
3
Comments
0

1 Embed 2

http://www.slideshare.net 2

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • - Pablo, LT pitch <br />
  • - how many of you have had to do either of these? <br /> - were your builds consistent? <br />
  • - Automation - let’s help Skynet take over faster <br /> - once complete, you only really need to touch it to handle new features <br /> - SOX compliance - be able to have another human handle the process with a single command <br />
  • - i have an example coming up soon <br />
  • <br />
  • <br />
  • <br />
  • - Hello world task <br /> - 4 different ways to name rakefile <br /> - require rake (One Click installer put the rake call into your environment variables PATH) <br /> - description, task name (string or symbol) and block <br />
  • - the rake command will walk upward (the file directory) until it finds it first Rakefile (or variant) <br /> <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />

AlamoCoders May 09 - Rake AlamoCoders May 09 - Rake Presentation Transcript

  • Rake Jason Meridth AlamoCoders May 2009 http://www.slideshare.net/armmer/alamocoders-may-09-rake-1424692
  • Manual Builds • Compile + X-Copy • Zip file http://www.slideshare.net/armmer/alamocoders-may-09-rake-1424692
  • Why Automate? • Once done, rarely need to touch it again • Immediate feedback • Can work on other stuff besides the build • Remove human interaction (decrease errors) • Reproducible http://www.slideshare.net/armmer/alamocoders-may-09-rake-1424692
  • Current Solutions • NAnt • MSBuild http://www.slideshare.net/armmer/alamocoders-may-09-rake-1424692
  • Old School: NAnt <?xml version=quot;1.0quot; encoding=quot;utf-8quot;?> <project name=quot;HelloUserquot; default=quot;completequot; xmlns=quot;http://nant.sf.net/schemas/ <copy todir=quot;${build.dir}quot; overwrite=quot;truequot;> nant.xsdquot;> <fileset basedir=quot;HelloUserbinDebugquot;> <property name=quot;build.dirquot; value=quot;buildquot; /> <include name=quot;HelloUser.exequot; /> <property name=quot;dist.dirquot; value=quot;distquot; /> <include name=quot;HelloUser.pdbquot; /> <property name=quot;build.numberquot; value=quot;0.0.0.1quot; /> <include name=quot;HelloUserLibrary.dllquot; /> <property name=quot;productquot; value=quot;HelloUserquot; /> <include name=quot;HelloUserLibrary.pdbquot; /> <property name=quot;copyrightquot; value=quot;Copyright 2008-2009 Jason Meridth. All </fileset> rights reservedquot; /> </copy> <property name=quot;clr.versionquot; value=quot;v3.5quot; /> </target> <property name=quot;msbuildquot; value=quot;${environment::get-variable('WINDIR')}/ Microsoft.NET/Framework/${clr.version}/MSBuild.exequot; /> <target name=quot;setupquot; depends=quot;compilequot;> <target name=quot;completequot; depends=quot;prepare, compile, setup, unit_test, </target> create_zipquot; description=quot;Compile and Run Testsquot; /> <target name=quot;unit_testquot;> <target name=quot;preparequot; description=quot;Deletes all generated folders and files to <exec program=quot;nunit-console.exequot; basedir=quot;libnunitquot;> start with clean folder structurequot;> <arg value=quot;HelloUserLibraryTestsbinDebug <delete dir=quot;${build.dir}quot; /> HelloUserLibraryTests.dllquot; /> <delete dir=quot;${dist.dir}quot; /> </exec> </target> <mkdir dir=quot;${build.dir}quot; if=quot;${not directory::exists(build.dir)}quot;/> <mkdir dir=quot;${dist.dir}quot; if=quot;${not directory::exists(dist.dir)}quot;/> <target name=quot;create_zipquot;> </target> <zip zipfile=quot;${dist.dir}HelloUser-bin-${build.number}.zipquot;> <fileset basedir=quot;${build.dir}quot;> <target name=quot;compilequot; description=quot;Compiles debug solutionquot;> <include name=quot;**quot; /> <exec program=quot;${msbuild}quot;> </fileset> <arg value=quot;HelloUser.slnquot; /> </zip> <arg value=quot;/verbosity:minimalquot; /> </target> <arg value=quot;/p:Configuration=debugquot; /> </project> <arg value=quot;/p:WarningLevel=0quot; /> </exec> http://www.slideshare.net/armmer/alamocoders-may-09-rake-1424692
  • What is Rake? “...a simple Ruby build program with capabilities similar to make” ~ Jim Weirich (creator) http://www.slideshare.net/armmer/alamocoders-may-09-rake-1424692
  • Install on Windows One Click Installer Cue VM... http://rubyforge.org/projects/rubyinstaller/ http://www.slideshare.net/armmer/alamocoders-may-09-rake-1424692
  • Hello World # Rakefile (or rakefile or rakefile.rb or Rakefile.rb) require 'rake' desc quot;Hello World!quot; task :hello_world do puts quot;Hello World!quot; end http://www.slideshare.net/armmer/alamocoders-may-09-rake-1424692
  • rake -T (--tasks) jasonmeridth@laptop ~/code/presentations/rake $ rake -T (in /Users/jasonmeridth/code/presentations/rake) rake hello_world # Hello World! http://www.slideshare.net/armmer/alamocoders-may-09-rake-1424692
  • run rake ~/code/presentations/rake $ rake hello_world (in /Users/jasonmeridth/code/presentations/rake) Hello World! http://www.slideshare.net/armmer/alamocoders-may-09-rake-1424692
  • A good Rakefile Example JAGregregory’s Fluent-NHibernate Rakefile (http://github.com/jagregory/fluent-nhibernate) http://www.slideshare.net/armmer/alamocoders-may-09-rake-1424692
  • Gotchas It is the RubyZip gem, _NOT_ ZipRuby. (Go ahead Joe, laugh) http://www.slideshare.net/armmer/alamocoders-may-09-rake-1424692
  • I can haz knowledge • One click install • Obeying Pragmatic Programmers - Learn a new language once a year • Easy to extend • Easy to read • Easy to learn http://www.slideshare.net/armmer/alamocoders-may-09-rake-1424692
  • You can haz questions ??? http://www.slideshare.net/armmer/alamocoders-may-09-rake-1424692
  • Resources • http://rake.rubyforge.org • http://github.com/jimweirich/rake • http://martinfowler.com/articles/rake.html • http://derickbailey.lostechies.com/archive/ 2009/05/08/how-a-net-developer-learned- ruby-and-rake-to-build-net-apps-in- windows.aspx • http://railsenvy.com/2007/6/11/ruby-on- rails-rake-tutorial • http://github.com/jagregory/fluent- nhibernate/tree/master http://www.slideshare.net/armmer/alamocoders-may-09-rake-1424692