diff options
author | Rémy Coutable <remy@rymai.me> | 2017-09-27 15:57:10 +0200 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-10-05 10:48:26 +0200 |
commit | 80e4fee782b8903d8f16dfc34548cc137a82dba2 (patch) | |
tree | f502ec5c1d73c1e694b423b4f5713e10b784bd45 /lib/tasks | |
parent | 37cdde195f713c65b4d4b95300d9ec21951d8d96 (diff) | |
download | gitlab-ce-80e4fee782b8903d8f16dfc34548cc137a82dba2.tar.gz |
Don't mark the import as finished if it wasn't successful in the `import:github` task
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/import.rake | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/tasks/import.rake b/lib/tasks/import.rake index 4d485108cf6..7243ca85de8 100644 --- a/lib/tasks/import.rake +++ b/lib/tasks/import.rake @@ -39,13 +39,19 @@ class GithubImport def import! @project.force_import_start + import_success = false + timings = Benchmark.measure do - Github::Import.new(@project, @options).execute + import_success = Github::Import.new(@project, @options).execute end - puts "Import finished. Timings: #{timings}".color(:green) - - @project.import_finish + if import_success + @project.import_finish + puts "Import finished. Timings: #{timings}".color(:green) + else + puts "Import was not successful. Errors were as follows:" + puts @project.import_error + end end def new_project |