summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2016-04-16 09:29:10 +0200
committerRobert Schilling <rschilling@student.tugraz.at>2016-04-18 11:14:59 +0200
commit0b56b0cdbdef9240ea1b4fca9617ec2250bc79de (patch)
tree758d7d7318d10a7503b1b477a5bfa4f8da481c24
parent27125401f3b8571a79a4f3ba2212afcb9acd214e (diff)
downloadgitlab-shell-0b56b0cdbdef9240ea1b4fca9617ec2250bc79de.tar.gz
Remove rm-tag command
-rw-r--r--CHANGELOG1
-rw-r--r--README.md4
-rw-r--r--lib/gitlab_projects.rb7
-rw-r--r--spec/gitlab_projects_spec.rb19
4 files changed, 1 insertions, 30 deletions
diff --git a/CHANGELOG b/CHANGELOG
index c97af1b..520b520 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,6 @@
v3.0.0
- Remove list-remote-tags command (Robert Schilling)
+ - Remove rm-tag command (Robert Schilling)
v2.7.1
- Add new command to list tags from a remote repo
diff --git a/README.md b/README.md
index 027e1e6..477df54 100644
--- a/README.md
+++ b/README.md
@@ -117,10 +117,6 @@ Create tag (lightweight & annotated):
./bin/gitlab-projects create-tag gitlab/gitlab-ci.git v3.0.0 3-0-stable
./bin/gitlab-projects create-tag gitlab/gitlab-ci.git v3.0.0 3-0-stable 'annotated message goes here'
-Remove tag:
-
- ./bin/gitlab-projects rm-tag gitlab/gitlab-ci.git v3.0.0
-
Gc repo:
./bin/gitlab-projects gc gitlab/gitlab-ci.git
diff --git a/lib/gitlab_projects.rb b/lib/gitlab_projects.rb
index 6a6c36e..d1a402a 100644
--- a/lib/gitlab_projects.rb
+++ b/lib/gitlab_projects.rb
@@ -53,7 +53,6 @@ class GitlabProjects
when 'create-branch'; create_branch
when 'rm-branch'; rm_branch
when 'create-tag'; create_tag
- when 'rm-tag'; rm_tag
when 'add-project'; add_project
when 'list-projects'; puts list_projects
when 'rm-project'; rm_project
@@ -140,12 +139,6 @@ class GitlabProjects
system(*cmd)
end
- def rm_tag
- tag_name = ARGV.shift
- cmd = %W(git --git-dir=#{full_path} tag -d -- #{tag_name})
- system(*cmd)
- end
-
def add_project
$logger.info "Adding project #{@project_name} at <#{full_path}>."
FileUtils.mkdir_p(full_path, mode: 0770)
diff --git a/spec/gitlab_projects_spec.rb b/spec/gitlab_projects_spec.rb
index 50af42f..0a1b0d6 100644
--- a/spec/gitlab_projects_spec.rb
+++ b/spec/gitlab_projects_spec.rb
@@ -139,25 +139,6 @@ describe GitlabProjects do
end
end
- describe :rm_tag do
- let(:gl_projects_create) {
- build_gitlab_projects('import-project', repo_name, 'https://github.com/randx/six.git')
- }
- let(:gl_projects_create_tag) {
- build_gitlab_projects('create-tag', repo_name, 'test_tag', 'master')
- }
- let(:gl_projects) { build_gitlab_projects('rm-tag', repo_name, 'test_tag') }
-
- it "should remove a branch" do
- gl_projects_create.exec
- gl_projects_create_tag.exec
- branch_ref = capture_in_tmp_repo(%W(git rev-parse test_tag))
- gl_projects.exec
- branch_del = capture_in_tmp_repo(%W(git rev-parse test_tag))
- branch_del.should_not == branch_ref
- end
- end
-
describe :add_project do
let(:gl_projects) { build_gitlab_projects('add-project', repo_name) }