Skip to content

Commit 007770a

Browse files
author
Serena_R
committed
[CHG] add client api
1 parent cbd4269 commit 007770a

File tree

6 files changed

+18
-15
lines changed

6 files changed

+18
-15
lines changed

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
bigkeeper (0.9.9)
4+
bigkeeper (0.9.11)
55
big_resources
66
big_stash (~> 0.1)
77
cocoapods

lib/big_keeper.rb

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,17 @@ module BigKeeper
4141
exit
4242
end
4343

44-
pre do |global_options, command, options, args|
45-
LeanCloudLogger.instance.start_log(global_options, args)
46-
end
47-
48-
post do |global_options, command, options, args|
49-
is_show_log = true
50-
if global_options[:log] == 'false'
51-
is_show_log = false
52-
end
53-
LeanCloudLogger.instance.end_log(true, is_show_log)
54-
end
44+
# pre do |global_options, command, options, args|
45+
# LeanCloudLogger.instance.start_log(global_options, args)
46+
# end
47+
#
48+
# post do |global_options, command, options, args|
49+
# is_show_log = true
50+
# if global_options[:log] == 'true'
51+
# is_show_log = false
52+
# end
53+
# LeanCloudLogger.instance.end_log(true, is_show_log)
54+
# end
5555

5656
feature_and_hotfix_command(GitflowType::FEATURE)
5757

lib/big_keeper/command/client.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
require 'big_keeper/util/leancloud_logger'
22
require 'big_keeper/command/pod/podfile'
33
require 'big_keeper/command/spec/list'
4+
require 'big_keeper/util/list_generator'
5+
46
module BigKeeper
57

68
def self.client_command
@@ -33,12 +35,12 @@ def self.client_command
3335
c.command :feature do |feature|
3436
feature.desc "List all the features including origin."
3537
feature.command :list do | list |
38+
list.flag %i[v version] , default_value: 'all versions'
3639
list.action do |global_options, options, args|
3740
LeanCloudLogger.instance.set_command("feature/list/json")
3841
options[:json] = true
3942
path = File.expand_path(global_options[:path])
4043
user = global_options[:user].gsub(/[^0-9A-Za-z]/, '').downcase
41-
print(1231231)
4244
list(path, user, GitflowType::FEATURE, options)
4345
end
4446
end

lib/big_keeper/command/feature&hotfix/delete.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ def self.delete(path, user, name, type)
2020
# Parse Bigkeeper file
2121
BigkeeperParser.parse("#{path}/Bigkeeper")
2222
branch_name = "#{GitflowType.name(type)}/#{name}"
23+
version = 'all version'
2324

2425
modules = BigkeeperParser.module_names
25-
2626
modules.each do |module_name|
2727
module_full_path = BigkeeperParser.module_full_path(path, user, module_name)
2828

lib/big_keeper/service/git_service.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ def branchs_with_type(path, type)
116116
Dir.chdir(path) do
117117
IO.popen('git branch -a') do | io |
118118
io.each do | line |
119+
branchs << line.gsub('\n', '') if line.include?('develop')
119120
branchs << line.gsub(/\s/, '') if line =~ /[\s\S]*#{GitflowType.name(type)}*/
120121
end
121122
end

lib/big_keeper/util/file_operator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ def find_all_code_file(path)
2929
return header_file_list+m_file_list
3030
end
3131
end
32-
32+
3333
end

0 commit comments

Comments
 (0)