diff options
author | Rémy Coutable <remy@rymai.me> | 2016-04-19 16:35:13 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-04-19 16:35:13 +0000 |
commit | 4a8db75d9de6ff5ce56be6c36e957e89971a2d42 (patch) | |
tree | 05c51355c3abb19014fdfb1b7d368986ce061c22 | |
parent | d5020c5cf8a151ac22af6c4d3caf35a5d04c7bdd (diff) | |
parent | 3739a840521b64d72fe7ed2c30a53bd3ee61b64a (diff) | |
download | gitlab-shell-4a8db75d9de6ff5ce56be6c36e957e89971a2d42.tar.gz |
Merge branch 'remove-branch-functionality' into 'master'
Remove branch functionality
The branch functionality is already replaced with rugged inside GitLab
See merge request !52
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | README.md | 8 | ||||
-rw-r--r-- | lib/gitlab_projects.rb | 15 | ||||
-rw-r--r-- | spec/gitlab_projects_spec.rb | 34 |
4 files changed, 1 insertions, 57 deletions
@@ -1,6 +1,7 @@ v3.0.0 - Remove list-remote-tags command (Robert Schilling) - Remove rm-tag command (Robert Schilling) + - Remove create-branch and rm-branch commands (Robert Schilling) v2.7.1 - Add new command to list tags from a remote repo @@ -104,14 +104,6 @@ Update HEAD: ./bin/gitlab-projects update-head gitlab/gitlab-ci.git 3-2-stable -Create branch: - - ./bin/gitlab-projects create-branch gitlab/gitlab-ci.git 3-2-stable master - -Remove branch: - - ./bin/gitlab-projects rm-branch gitlab/gitlab-ci.git 3-0-stable - Create tag (lightweight & annotated): ./bin/gitlab-projects create-tag gitlab/gitlab-ci.git v3.0.0 3-0-stable diff --git a/lib/gitlab_projects.rb b/lib/gitlab_projects.rb index d1a402a..bc98e09 100644 --- a/lib/gitlab_projects.rb +++ b/lib/gitlab_projects.rb @@ -50,8 +50,6 @@ class GitlabProjects def exec case @command - when 'create-branch'; create_branch - when 'rm-branch'; rm_branch when 'create-tag'; create_tag when 'add-project'; add_project when 'list-projects'; puts list_projects @@ -114,19 +112,6 @@ class GitlabProjects end end - def create_branch - branch_name = ARGV.shift - ref = ARGV.shift || "HEAD" - cmd = %W(git --git-dir=#{full_path} branch -- #{branch_name} #{ref}) - system(*cmd) - end - - def rm_branch - branch_name = ARGV.shift - cmd = %W(git --git-dir=#{full_path} branch -D -- #{branch_name}) - system(*cmd) - end - def create_tag tag_name = ARGV.shift ref = ARGV.shift || "HEAD" diff --git a/spec/gitlab_projects_spec.rb b/spec/gitlab_projects_spec.rb index 0a1b0d6..47582f3 100644 --- a/spec/gitlab_projects_spec.rb +++ b/spec/gitlab_projects_spec.rb @@ -68,40 +68,6 @@ describe GitlabProjects do it { @gl_projects.instance_variable_get(:@full_path).should == "#{GitlabConfig.new.repos_path}/gitlab-ci.git" } end - describe :create_branch do - let(:gl_projects_create) { - build_gitlab_projects('import-project', repo_name, 'https://github.com/randx/six.git') - } - let(:gl_projects) { build_gitlab_projects('create-branch', repo_name, 'test_branch', 'master') } - - it "should create a branch" do - gl_projects_create.exec - gl_projects.exec - branch_ref = capture_in_tmp_repo(%W(git rev-parse test_branch)) - master_ref = capture_in_tmp_repo(%W(git rev-parse master)) - branch_ref.should == master_ref - end - end - - describe :rm_branch do - let(:gl_projects_create) { - build_gitlab_projects('import-project', repo_name, 'https://github.com/randx/six.git') - } - let(:gl_projects_create_branch) { - build_gitlab_projects('create-branch', repo_name, 'test_branch', 'master') - } - let(:gl_projects) { build_gitlab_projects('rm-branch', repo_name, 'test_branch') } - - it "should remove a branch" do - gl_projects_create.exec - gl_projects_create_branch.exec - branch_ref = capture_in_tmp_repo(%W(git rev-parse test_branch)) - gl_projects.exec - branch_del = capture_in_tmp_repo(%W(git rev-parse test_branch)) - branch_del.should_not == branch_ref - end - end - describe :create_tag do let(:gl_projects_create) { build_gitlab_projects('import-project', repo_name, 'https://github.com/randx/six.git') |