lhj-tools 0.2.54 → 0.2.56
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lhj/helper/app_version_info.rb +27 -0
- data/lib/lhj/helper/pgyer_helper.rb +1 -0
- data/lib/lhj/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82c93a210742ecf72d29fac19fdcf217bcc49009f524ec0c0024953b9072aa5f
|
4
|
+
data.tar.gz: a7fd691691e09f01d76e04d67998a540a5051d38a617b35001e0f86876ea49f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 995f03687c2891e11cea349bb6979c930b595d0e9a27f5382f931780fe0b6103a2dabb476471e48e467fde94ceeb5067568127a7d9dd555fbb535250810fe63e
|
7
|
+
data.tar.gz: 2d55f0ed870d359e3a982fcdc4c90a6f328fb118f83c1c30926596109df1941e0d8b36e780d46cf6048e0dfd817610ab7b10105ad76184f44a8c0b03a8f453ed
|
@@ -13,8 +13,13 @@ module Lhj
|
|
13
13
|
|
14
14
|
version_var_name = 'MARKETING_VERSION'
|
15
15
|
@version_regex = /^(?<begin>[^#]*#{version_var_name}\s*=\s*)(?<value>(?<major>[0-9]+)(\.(?<minor>[0-9]+))?(\.(?<patch>[0-9]+))?(?<appendix>(\.[0-9]+)*)?(-(?<prerelease>(.+)))?)(?<end>)/i
|
16
|
+
modify_code
|
17
|
+
end
|
18
|
+
|
19
|
+
def modify_code
|
16
20
|
setup_config
|
17
21
|
setup_shell_script
|
22
|
+
setup_pod_script
|
18
23
|
end
|
19
24
|
|
20
25
|
def setup_config
|
@@ -38,6 +43,28 @@ module Lhj
|
|
38
43
|
project.save
|
39
44
|
end
|
40
45
|
|
46
|
+
def setup_pod_script
|
47
|
+
project_path = Dir["#{@work_path}/*.xcodeproj"].first
|
48
|
+
project = Xcodeproj::Project.open(project_path)
|
49
|
+
target = project.targets.first
|
50
|
+
Dir.glob("#{@work_path}/**/Pods-#{target.display_name}-frameworks.sh").each do |file|
|
51
|
+
need_modify = false
|
52
|
+
content = ''
|
53
|
+
File.open(file) do |f|
|
54
|
+
f.each_line do |line|
|
55
|
+
if line =~ /source="\$\(readlink "\${source}"\)"/
|
56
|
+
content += ' source="$(readlink -f "${source}")"'
|
57
|
+
content += "\n"
|
58
|
+
need_modify = true
|
59
|
+
else
|
60
|
+
content += line
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
File.write(file, content) if need_modify
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
41
68
|
# build_app_version (build_app_version_no) (build: build_version)
|
42
69
|
def build_info
|
43
70
|
"#{build_app_version} (#{build_app_version_no}) (build: #{build_version})"
|
data/lib/lhj/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lhj-tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.56
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lihaijian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xcodeproj
|