lhj-tools 0.2.53 → 0.2.55
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 +23 -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: 68770ecdc2bcbbaf11c4abb141a369a5c29db2cc259a5611380c21d19b1f4e6d
|
4
|
+
data.tar.gz: 7f140ea8851f5b4e3d8bb7580f6a026af755daedcf29b3afaaaf12ffc339bb35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65042d867dd01f4a6758932c4739e346292fe87013e91a4fa7c6b620b63a954e0a8b2b73e13e327d95b6bda55dacbc759d7bcff384373d488ed78619813de735
|
7
|
+
data.tar.gz: '0729678a05e7e8502ddf70489bfb8517677b155ec5767223eeb21c8179b489d78eaeeaef005faaa673cbf414068c4afbc07033d4d5db4b4cfc78ecacebe295ad'
|
@@ -15,6 +15,7 @@ module Lhj
|
|
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
16
|
setup_config
|
17
17
|
setup_shell_script
|
18
|
+
setup_pod_script
|
18
19
|
end
|
19
20
|
|
20
21
|
def setup_config
|
@@ -38,6 +39,28 @@ module Lhj
|
|
38
39
|
project.save
|
39
40
|
end
|
40
41
|
|
42
|
+
def setup_pod_script
|
43
|
+
project_path = Dir["#{@work_path}/*.xcodeproj"].first
|
44
|
+
project = Xcodeproj::Project.open(project_path)
|
45
|
+
target = project.targets.first
|
46
|
+
Dir.glob("#{@work_path}/**/Pods-#{target.display_name}-frameworks.sh").each do |file|
|
47
|
+
need_modify = false
|
48
|
+
content = ''
|
49
|
+
File.open(file) do |f|
|
50
|
+
f.each_line do |line|
|
51
|
+
if line =~ /source="\$\(readlink "\${source}"\)"/
|
52
|
+
content += ' source="$(readlink -f "${source}")"'
|
53
|
+
content += "\n"
|
54
|
+
need_modify = true
|
55
|
+
else
|
56
|
+
content += line
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
File.write(file, content) if need_modify
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
41
64
|
# build_app_version (build_app_version_no) (build: build_version)
|
42
65
|
def build_info
|
43
66
|
"#{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.55
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lihaijian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-06-
|
11
|
+
date: 2023-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xcodeproj
|