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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5c66e827342a78b13c1b2164a76a28622b9c20b8d3970ae68cf89a03c32099f5
4
- data.tar.gz: 8daad6f1e59e9bcd0e4bbe7d363d7d5dab23279f09ac54305f149ca34b18314d
3
+ metadata.gz: 82c93a210742ecf72d29fac19fdcf217bcc49009f524ec0c0024953b9072aa5f
4
+ data.tar.gz: a7fd691691e09f01d76e04d67998a540a5051d38a617b35001e0f86876ea49f6
5
5
  SHA512:
6
- metadata.gz: 4ef007501f438cbdf762c11c6917c614f8f726f2df9f891363533eedf658821f801b6a72c32e0946b8b17658f51173a8973535ebf90658303a21f9946a45ceee
7
- data.tar.gz: dc9869dd1c28bf4f3b07cedb219ea835a4a980cebcad34e922029fecd30ad478d0cc7d699d85d0cfffba17dbee60b698bdbbbc3bb1fbc81cb40471b1c9d301e1
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})"
@@ -76,6 +76,7 @@ module Lhj
76
76
  def upload_with_type(path, file)
77
77
  return unless @env == :release
78
78
  return unless /hai/ =~ path
79
+ return if @env == :release
79
80
 
80
81
  # step 1
81
82
  folder_path_dir = path
data/lib/lhj/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lhj
4
- VERSION = '0.2.54'
4
+ VERSION = '0.2.56'
5
5
  end
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.54
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-06-14 00:00:00.000000000 Z
11
+ date: 2023-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xcodeproj