The 'sh' tasks will fail the build if they play nice with return codes.

On 20 April 2010 15:57, Markus Roberts <[email protected]> wrote:

> This is risky code, in that it does no checking to see if one step worked
> before plunging on to the next.  It might make sense to use $CHILD_STATUS
> liberally or to use something like the Git module (see refactoring_tools.rb
> in my tools_for_refactoring_puppet branch).  Also, "git add *" could easily
> sweep up things we don't want unless the output dir is brand new & newly
> populated.  And finally the "DISABLED FOR NOW" comment looks to be out of
> date.
>
>
> On Tue, Apr 20, 2010 at 3:32 AM, James Turnbull 
> <[email protected]>wrote:
>
>>
>> Signed-off-by: James Turnbull <[email protected]>
>> ---
>>  Rakefile |   18 ++++++++++++++----
>>  1 files changed, 14 insertions(+), 4 deletions(-)
>>
>> diff --git a/Rakefile b/Rakefile
>> index 71f1cca..31a36dd 100644
>> --- a/Rakefile
>> +++ b/Rakefile
>> @@ -119,10 +119,20 @@ end
>>  # Puppet Labs Only:
>>  # DISABLED FOR NOW, not the right location
>>
>> -#desc "Release the documentation (Puppet Labs Only)"
>> -#task :release do
>> -#  sh "rsync -e ssh -avz output/ [email protected]:
>> /var/www/docs/html"
>> -#end
>> +desc "Release the documentation (Puppet Labs Only)"
>> +task :release do
>> +  branch = "release"
>> +  sh "git checkout master"
>> +  sh "git branch -f #{branch}"
>> +  sh "git checkout #{branch}"
>> +  Rake::Task['generate'].invoke
>> +  FileUtils.cd 'output'
>> +  sh "git add *"
>> +  sh "git commit -a -m 'Released Puppet Documentation'"
>> +  sh "git branch -D -r origin/#{branch}"
>> +  sh "git push --force origin #{branch}"
>> +  sh "git checkout master"
>> +end
>>
>>  #require 'spec/rake/spectask'
>>  #Spec::Rake::SpecTask.new(:spec) do |spec|
>> --
>> 1.6.6.1
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Developers" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<puppet-dev%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/puppet-dev?hl=en.
>>
>>
>
>
> --
> -----------------------------------------------------------
> The power of accurate observation is
> commonly called cynicism by those
> who have not got it.  ~George Bernard Shaw
> ------------------------------------------------------------
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Developers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<puppet-dev%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/puppet-dev?hl=en.
>



-- 
Julian Simpson
Software Build and Deployment
http://www.build-doctor.com
http://twitter.com/builddoctor

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to