diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-03-25 15:11:50 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-03-25 15:11:50 +0200 |
commit | 30185044bf831069b346a58b2b717b0f45a63f86 (patch) | |
tree | 5bf86ca8abc789d1fc44193845726dab37facabd | |
parent | f0eb80177b77a16ace120f9fb8d03a36924c32b5 (diff) | |
download | gitlab-shell-30185044bf831069b346a58b2b717b0f45a63f86.tar.gz |
return non-zero status if gitlab-projects or gitlab-keys cmd was not successfulv1.2.0
-rw-r--r-- | CHANGELOG | 3 | ||||
-rw-r--r-- | VERSION | 2 | ||||
-rwxr-xr-x | bin/gitlab-keys | 8 | ||||
-rwxr-xr-x | bin/gitlab-projects | 8 | ||||
-rw-r--r-- | lib/gitlab_keys.rb | 1 | ||||
-rw-r--r-- | lib/gitlab_projects.rb | 1 |
6 files changed, 18 insertions, 5 deletions
@@ -1,3 +1,6 @@ +v1.2.0 + - Return non-zero result if gitlab-projects and gitlab-keys execution was not successful + v1.1.0 - added mv-project feature - increased test coverage @@ -1 +1 @@ -1.1.0 +1.2.0 diff --git a/bin/gitlab-keys b/bin/gitlab-keys index 26d46cd..2a8aea1 100755 --- a/bin/gitlab-keys +++ b/bin/gitlab-keys @@ -12,6 +12,10 @@ require_relative '../lib/gitlab_init' # 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 diff --git a/bin/gitlab-projects b/bin/gitlab-projects index 21e4305..95d0475 100755 --- a/bin/gitlab-projects +++ b/bin/gitlab-projects @@ -16,6 +16,10 @@ require_relative '../lib/gitlab_init' # /bin/gitlab-projects import-project randx/six.git https://github.com/randx/six.git # 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 diff --git a/lib/gitlab_keys.rb b/lib/gitlab_keys.rb index 756dd96..2173f4c 100644 --- a/lib/gitlab_keys.rb +++ b/lib/gitlab_keys.rb @@ -18,6 +18,7 @@ class GitlabKeys when 'rm-key'; rm_key else puts 'not allowed' + false end end diff --git a/lib/gitlab_projects.rb b/lib/gitlab_projects.rb index 8ef967a..aef343e 100644 --- a/lib/gitlab_projects.rb +++ b/lib/gitlab_projects.rb @@ -31,6 +31,7 @@ class GitlabProjects when 'import-project'; import_project else puts 'not allowed' + false end end |