Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 69cecbb

Browse files
halt rake process on error
1 parent 6a913e9 commit 69cecbb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Rakefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ task :deploy => [:check_git] do
1919
puts "...git pull origin \"#{source_branch}\""
2020
system "git pull origin \"#{source_branch}\""
2121
puts "...getting latest python docs"
22-
system "rm -rf _posts/python/html"
23-
system "git clone -b built [email protected]:plotly/plotly.py-docs _posts/python/html"
22+
system "rm -rf _posts/python/html" or exit!(1)
23+
system "git clone -b built [email protected]:plotly/plotly.py-docs _posts/python/html" or exit!(1)
2424
puts "...update plot schema"
25-
system "python ./get_plotschema.py && git add _data/plotschema.json && git commit -m \"Updated plotschema at #{Time.now.utc}\" && git push origin \"#{source_branch}\""
25+
system "python ./get_plotschema.py && git add _data/plotschema.json && git commit -m \"Updated plotschema at #{Time.now.utc}\" && git push origin \"#{source_branch}\"" or exit!(1)
2626
puts "...generate _site"
27-
system "jekyll build --verbose && git checkout \"#{deploy_branch}\" && git pull origin \"#{deploy_branch}\" && cp -r _site/* . && rm -rf _site/ && touch .nojekyll && git add . && git commit -m \"#{message}\" && git push origin \"#{deploy_branch}\""
27+
system "jekyll build --verbose && git checkout \"#{deploy_branch}\" && git pull origin \"#{deploy_branch}\" && cp -r _site/* . && rm -rf _site/ && touch .nojekyll && git add . && git commit -m \"#{message}\" && git push origin \"#{deploy_branch}\"" or exit!(1)
2828
puts "...git checkout \"#{source_branch}\""
29-
system "git checkout \"#{source_branch}\""
29+
system "git checkout \"#{source_branch}\"" or exit!(1)
3030
system "osascript -e 'display notification \"rake deploy just finished\" with title \"Docs are ready!\"'"
3131
end

0 commit comments

Comments
 (0)