Commit 30185044 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

return non-zero status if gitlab-projects or gitlab-keys cmd was not successful

parent f0eb8017
v1.2.0
- Return non-zero result if gitlab-projects and gitlab-keys execution was not successful
v1.1.0 v1.1.0
- added mv-project feature - added mv-project feature
- increased test coverage - increased test coverage
......
...@@ -12,6 +12,10 @@ require_relative '../lib/gitlab_init' ...@@ -12,6 +12,10 @@ require_relative '../lib/gitlab_init'
# #
require File.join(ROOT_PATH, 'lib', 'gitlab_keys') require File.join(ROOT_PATH, 'lib', 'gitlab_keys')
GitlabKeys.new.exec
exit # Return non-zero if command execution was not successful
if GitlabKeys.new.exec
exit 0
else
exit 1
end
...@@ -16,6 +16,10 @@ require_relative '../lib/gitlab_init' ...@@ -16,6 +16,10 @@ require_relative '../lib/gitlab_init'
# /bin/gitlab-projects import-project randx/six.git https://github.com/randx/six.git # /bin/gitlab-projects import-project randx/six.git https://github.com/randx/six.git
# #
require File.join(ROOT_PATH, 'lib', 'gitlab_projects') require File.join(ROOT_PATH, 'lib', 'gitlab_projects')
GitlabProjects.new.exec
exit # Return non-zero if command execution was not successful
if GitlabProjects.new.exec
exit 0
else
exit 1
end
...@@ -18,6 +18,7 @@ class GitlabKeys ...@@ -18,6 +18,7 @@ class GitlabKeys
when 'rm-key'; rm_key when 'rm-key'; rm_key
else else
puts 'not allowed' puts 'not allowed'
false
end end
end end
......
...@@ -31,6 +31,7 @@ class GitlabProjects ...@@ -31,6 +31,7 @@ class GitlabProjects
when 'import-project'; import_project when 'import-project'; import_project
else else
puts 'not allowed' puts 'not allowed'
false
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment