bigkeeper 0.9.1 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: af5169e70a626a1706572fdf6393a3788165e10f
4
- data.tar.gz: 11f54ee3aea3911d82d6a7bf8b0b40f6654b755b
3
+ metadata.gz: 984646f715b01935f0df1fc84d7bbab58ed75b4a
4
+ data.tar.gz: 202103da5bdd8813bafae83bb02a8f06102d8a05
5
5
  SHA512:
6
- metadata.gz: f602f2a150a7fc70c1c11d923ca5f052b453a8cb08fd4f81c4ecb560210b7762e8e15af380c7d448e676c47155142363cfad5bef2857157390986139aa1744b4
7
- data.tar.gz: 76e6f74558df7762c76907b23538798122c3817f2b8b842e4297db6ebde4bca17c457f4e767c4b7afac721df7e212df5c27defdae14dc5383a7e220b1d5d416f
6
+ metadata.gz: 0351cf5e60e4cd89e9e6ca803871593de5d74170525eec45226798030c6f30138693cf47449f77ab2f5ff69201ccc1a66f401055563afaf3a470492c9dce3cdd
7
+ data.tar.gz: f155c7d12a092fc9016ee9bca4466a3b7a31c33285e309f5adc9ee90bc85161cc41bb286c9d7bc720c62a17b587f8194e40738f5c830251fe175939fa2c472ea
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bigkeeper (0.9.0)
4
+ bigkeeper (0.9.2)
5
5
  big_resources
6
6
  big_stash (~> 0.1)
7
7
  cocoapods
data/bin/big CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require "bundler/setup"
3
+ # require "bundler/setup"
4
4
  require "big_keeper"
5
5
 
6
6
  # You can add fixtures and/or initialization code here to make experimenting
@@ -9,20 +9,10 @@ module BigKeeper
9
9
 
10
10
  def backup
11
11
  GradleOperator.new(@path).backup
12
- modules = ModuleCacheOperator.new(@path).all_path_modules
13
- modules.each do |module_name|
14
- module_full_path = BigkeeperParser.module_full_path(@path, @user, module_name)
15
- GradleOperator.new(module_full_path).backup
16
- end
17
12
  end
18
13
 
19
14
  def recover
20
15
  GradleOperator.new(@path).recover
21
- modules = ModuleCacheOperator.new(@path).all_path_modules
22
- modules.each do |module_name|
23
- module_full_path = BigkeeperParser.module_full_path(@path, @user, module_name)
24
- GradleOperator.new(module_full_path).recover
25
- end
26
16
  end
27
17
 
28
18
  def update_module_config(module_name, module_operate_type)
@@ -52,7 +42,7 @@ module BigKeeper
52
42
  end
53
43
 
54
44
  def generate_version_config_of_line(line, module_name, module_operate_type)
55
- if line.downcase.match(/([\s\S]*)#{module_name.downcase}version(\s*)=(\s*)('|")(\S*)('|")([\s\S]*)/)
45
+ if line.downcase.match(/([\s\S]*)#{module_name.downcase.gsub('-','')}version(\s*)=(\s*)('|")(\S*)('|")([\s\S]*)/)
56
46
  branch_name = GitOperator.new.current_branch(@path)
57
47
  version_name = ''
58
48
  # Get version part of source.addition
@@ -76,7 +66,7 @@ module BigKeeper
76
66
  origin_config = ''
77
67
  File.open("#{@path}/.bigkeeper/#{PATH_VERSION_CONFIG}", 'r') do |file|
78
68
  file.each_line do |line|
79
- if line.downcase.match(/([\s\S]*)#{module_name.downcase}version(\s*)=(\s*)('|")(\S*)('|")([\s\S]*)/)
69
+ if line.downcase.match(/([\s\S]*)#{module_name.downcase.gsub('-','')}version(\s*)=(\s*)('|")(\S*)('|")([\s\S]*)/)
80
70
  origin_config = line
81
71
  break
82
72
  end
@@ -15,13 +15,18 @@ module BigKeeper
15
15
  cache_operator.save(PATH_VERSION_CONFIG)
16
16
  end
17
17
 
18
- def recover(settings_config, build_config)
18
+ def recover()
19
19
  cache_operator = CacheOperator.new(@path)
20
- cache_operator.load(PATH_VERSION_CONFIG)
20
+ # cache_operator.load(PATH_VERSION_CONFIG)
21
21
  cache_operator.clean
22
22
  end
23
23
 
24
24
  def update_version_config(module_name, module_operate_type)
25
+ module_full_path = BigkeeperParser.module_full_path(@path, @user, module_name)
26
+ if module_operate_type == ModuleOperateType::ADD
27
+ GradleOperator.new(module_full_path).backup
28
+ end
29
+
25
30
  temp_file = Tempfile.new('.version-config.gradle.tmp')
26
31
  begin
27
32
  File.open("#{@path}/#{PATH_VERSION_CONFIG}", 'r') do |file|
@@ -39,10 +44,14 @@ module BigKeeper
39
44
  temp_file.close
40
45
  temp_file.unlink
41
46
  end
47
+
48
+ if module_operate_type == ModuleOperateType::PUBLISH
49
+ GradleOperator.new(module_full_path).recover
50
+ end
42
51
  end
43
52
 
44
53
  def generate_version_config_of_line(line, module_name, module_operate_type)
45
- if line.downcase.match(/([\s\S]*)#{module_name.downcase}version(\s*)=(\s*)('|")(\S*)('|")([\s\S]*)/)
54
+ if line.downcase.match(/([\s\S]*)#{module_name.downcase.gsub('-','')}version(\s*)=(\s*)('|")(\S*)('|")([\s\S]*)/)
46
55
  branch_name = GitOperator.new.current_branch(@path)
47
56
  version_name = ''
48
57
 
@@ -63,7 +72,7 @@ module BigKeeper
63
72
  origin_config = ''
64
73
  File.open("#{@path}/.bigkeeper/#{PATH_VERSION_CONFIG}", 'r') do |file|
65
74
  file.each_line do |line|
66
- if line.downcase.match(/([\s\S]*)#{module_name.downcase}version(\s*)=(\s*)('|")(\S*)('|")([\s\S]*)/)
75
+ if line.downcase.match(/([\s\S]*)#{module_name.downcase.gsub('-','')}version(\s*)=(\s*)('|")(\S*)('|")([\s\S]*)/)
67
76
  origin_config = line
68
77
  break
69
78
  end
@@ -1,3 +1,3 @@
1
1
  module BigKeeper
2
- VERSION = "0.9.1"
2
+ VERSION = "0.9.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bigkeeper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - mmoaay
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-15 00:00:00.000000000 Z
11
+ date: 2019-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gli