bigkeeper 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/bin/big +1 -1
- data/lib/big_keeper/dependency/dep_gradle_operator.rb +2 -12
- data/lib/big_keeper/util/gradle_operator.rb +13 -4
- data/lib/big_keeper/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 984646f715b01935f0df1fc84d7bbab58ed75b4a
|
4
|
+
data.tar.gz: 202103da5bdd8813bafae83bb02a8f06102d8a05
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0351cf5e60e4cd89e9e6ca803871593de5d74170525eec45226798030c6f30138693cf47449f77ab2f5ff69201ccc1a66f401055563afaf3a470492c9dce3cdd
|
7
|
+
data.tar.gz: f155c7d12a092fc9016ee9bca4466a3b7a31c33285e309f5adc9ee90bc85161cc41bb286c9d7bc720c62a17b587f8194e40738f5c830251fe175939fa2c472ea
|
data/Gemfile.lock
CHANGED
data/bin/big
CHANGED
@@ -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(
|
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
|
data/lib/big_keeper/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2019-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gli
|