Commit 29486555dc00b85f3f3a57c44b79cf6998d87fc8
1 parent
cbb798cf
Exists in
master
and in
17 other branches
ci:smoke: fail explicitly if git is not installed
Showing
1 changed file
with
7 additions
and
1 deletions
Show diff stats
lib/tasks/ci.rake
... | ... | @@ -3,7 +3,12 @@ namespace :ci do |
3 | 3 | desc 'Continuous integration smoke test' |
4 | 4 | task :smoke do |
5 | 5 | |
6 | - current_branch = `git rev-parse --abbrev-ref HEAD`.strip | |
6 | + current_branch = `git rev-parse --abbrev-ref HEAD` | |
7 | + if current_branch | |
8 | + current_branch.strip! | |
9 | + else | |
10 | + fail 'Could not determine current branch. Is git installed?' | |
11 | + end | |
7 | 12 | from = ENV['PREV_HEAD'] || "origin/#{current_branch}" |
8 | 13 | if !system("git show-ref --verify --quiet refs/remotes/#{from}") |
9 | 14 | from = 'origin/master' |
... | ... | @@ -46,6 +51,7 @@ namespace :ci do |
46 | 51 | |
47 | 52 | if tests.empty? && features.empty? && changed_plugins.empty? |
48 | 53 | puts "Could not figure out specific changes to be tested in isolation!" |
54 | + puts "Assuming it's all good" | |
49 | 55 | end |
50 | 56 | puts |
51 | 57 | ... | ... |