fir-cli 2.0.24 → 2.0.25

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
  SHA256:
3
- metadata.gz: 780261ddc58b3e97a74409054acc6873d510c9f56651374f1430f94cb97fd779
4
- data.tar.gz: cb715ab080b9d6b87d6d804daae6ea88f91e870081003b555ca639e71a6ce5de
3
+ metadata.gz: ac9ebd4d15eba52e807875a875e4d56b0b814303937a5faa3a708dccebb9267f
4
+ data.tar.gz: be3231c934be27664cc3ed7e7f63fc82eef71350e429df9b3033d8116373ad7f
5
5
  SHA512:
6
- metadata.gz: a18e89e1da15843183dbe1a14a16ccbfe9a09914e924f2b3b9b73867bb7b813f30d2430df6a1f7471a2a90465e139f545af5586040f18c69d4c5ca6120d897ad
7
- data.tar.gz: 6ab8bbc3b9d15fbbcaacdb46a8eeb13a04e33fa00f5e09f68d5217f8736bfa07efbec7c490c7b29425d7c41b2a69a7d36520ae721e52bea2b6440d43138e6f3c
6
+ metadata.gz: 52401a32d81393c5eebb3cf587ad69cb5760d17b9b6dbfe51a41e5e38b73bd54b372b85256d5ebce3778e3c0d519a71e055b7d7ef4cd8814bc57aa6678984e18
7
+ data.tar.gz: 1ee68d93cada9a8a6cb3c727acc65a852f2061a9361df0e56643af04922281571bfad5e0bf54b2987a58e45a04755b5ee8d4d9e2373727c6544a7e06280d6654
@@ -5,31 +5,45 @@ on:
5
5
  branches: [ "master" ]
6
6
  pull_request:
7
7
  branches: [ "master" ]
8
+ workflow_dispatch:
8
9
 
9
10
  jobs:
10
-
11
11
  build:
12
-
13
12
  runs-on: ubuntu-latest
14
13
 
15
14
  steps:
16
- - uses: actions/checkout@v3
17
- - name: Build the Docker image
18
- run: docker buildx create --use && docker buildx build --platform=linux/arm64,linux/amd64 . --file Dockerfile --tag firhq/fir-cli:latest
19
-
20
- - name: get version Number
21
- id: show-version
22
- run: echo "::set-output name=result::$(docker run firhq/fir-cli:latest version | awk '{print $3}')"
23
-
24
- - name: check version number
25
- run: echo "the version is ${{ steps.show-version.outputs.result }}"
26
-
27
- - name: Tag image
28
- run: docker tag firhq/fir-cli:latest firhq/fir-cli:${{ steps.show-version.outputs.result }}
29
-
30
- - name: Login Docker
31
- run: docker login -u atpking -p ${{ secrets.DOCKER_ACCESS_TOKEN }}
32
-
33
- - name: Publish docker
34
- run: docker push firhq/fir-cli:latest && docker push firhq/fir-cli:${{ steps.show-version.outputs.result }}
35
-
15
+ - name: Checkout
16
+ uses: actions/checkout@v4
17
+
18
+ - name: Extract version
19
+ id: version
20
+ run: |
21
+ v=$(awk -F'"' '/VERSION/{print $2; exit}' lib/fir/version.rb)
22
+ echo "result=$v" >> "$GITHUB_OUTPUT"
23
+ echo "fir-cli version: $v"
24
+
25
+ - name: Set up QEMU
26
+ uses: docker/setup-qemu-action@v3
27
+
28
+ - name: Set up Docker Buildx
29
+ uses: docker/setup-buildx-action@v3
30
+
31
+ - name: Login to Docker Hub
32
+ if: github.event_name != 'pull_request'
33
+ uses: docker/login-action@v3
34
+ with:
35
+ username: atpking
36
+ password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
37
+
38
+ - name: Build and push
39
+ uses: docker/build-push-action@v6
40
+ with:
41
+ context: .
42
+ file: ./Dockerfile
43
+ platforms: linux/amd64,linux/arm64
44
+ push: ${{ github.event_name != 'pull_request' }}
45
+ tags: |
46
+ firhq/fir-cli:latest
47
+ firhq/fir-cli:${{ steps.version.outputs.result }}
48
+ cache-from: type=gha
49
+ cache-to: type=gha,mode=max
data/.gitignore CHANGED
@@ -27,3 +27,5 @@ lib/.byebug_history
27
27
  TAGS
28
28
  .vscode
29
29
  fir-cli-answer.json
30
+ mise.toml
31
+ .claude/
data/Dockerfile CHANGED
@@ -1,6 +1,9 @@
1
- FROM ruby:2.7.1
1
+ FROM ruby:3.2-slim
2
+ RUN apt-get update \
3
+ && apt-get install -y --no-install-recommends git ca-certificates build-essential \
4
+ && rm -rf /var/lib/apt/lists/*
2
5
  RUN gem install bundler
3
- ENV LANG=C.UTF-8
6
+ ENV LANG=C.UTF-8
4
7
  ENV WORKDIR=/fir-cli
5
8
  ENV HOME=/fir-cli
6
9
  RUN mkdir -p $WORKDIR
data/README.md CHANGED
@@ -19,6 +19,7 @@ fir.im-cli 可以通过指令查看, 上传, iOS/Android 应用.
19
19
  - 我们也提供 docker 版本的 fir-cli, 具体使用方式参见 **Docker 运行 fir-cli** 章节
20
20
 
21
21
  # 最近更新
22
+ - (2.0.25) 兼容 rubyzip 3.x: 修复 Ruby 3.2+ 环境下解析 ipa 报 `Info.plist not readable!` 的问题
22
23
  - (2.0.24) 修复部分 APK 包含非法 XML 控制字符导致解析失败的问题
23
24
  - (2.0.23) 增强上传稳定性
24
25
  - (2.0.22) 支持自定义下载文件名称 --user_download_file_name=具体文件名称 注意, 此参数无法与switch_to_qiniu 一起使用
data/fir-cli.gemspec CHANGED
@@ -46,4 +46,8 @@ Gem::Specification.new do |spec|
46
46
  spec.add_dependency 'rexml'
47
47
  spec.add_dependency 'CFPropertyList'
48
48
  spec.add_dependency 'api_tools', '~> 0.1.1'
49
+ # rubyzip is pulled in transitively by ruby_android_apk (>= 1.1.6, no upper
50
+ # bound). We support 2.x and 3.x in lib/fir/util/parser/ipa.rb; pin upper to
51
+ # < 4 so future major bumps don't silently break end users on `gem install`.
52
+ spec.add_dependency 'rubyzip', '>= 1.1.6', '< 4'
49
53
  end
@@ -46,11 +46,22 @@ module FIR
46
46
  return if @contents
47
47
  @contents = "#{Dir.tmpdir}/ipa_files-#{Time.now.to_i}"
48
48
 
49
+ # rubyzip 3.x changed Zip::File#extract: the second positional arg is now
50
+ # the entry path; the destination dir moved to a keyword arg. Detect by
51
+ # signature so we don't depend on Zip::VERSION (not auto-loaded in 2.x).
52
+ zip3 = Zip::File.instance_method(:extract).parameters.any? { |_t, n| n == :destination_directory }
53
+
49
54
  Zip::File.open(@path) do |zip_file|
50
55
  zip_file.each do |f|
51
56
  f_path = File.join(@contents, f.name)
57
+ next if File.exist?(f_path)
58
+
52
59
  FileUtils.mkdir_p(File.dirname(f_path))
53
- zip_file.extract(f, f_path) unless File.exist?(f_path)
60
+ if zip3
61
+ f.extract(File.basename(f.name), destination_directory: File.dirname(f_path))
62
+ else
63
+ zip_file.extract(f, f_path)
64
+ end
54
65
  end
55
66
  end
56
67
 
data/lib/fir/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module FIR
4
- VERSION = "2.0.24"
4
+ VERSION = "2.0.25"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fir-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.24
4
+ version: 2.0.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - NaixSpirit
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2026-03-15 00:00:00.000000000 Z
12
+ date: 2026-05-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -179,6 +179,26 @@ dependencies:
179
179
  - - "~>"
180
180
  - !ruby/object:Gem::Version
181
181
  version: 0.1.1
182
+ - !ruby/object:Gem::Dependency
183
+ name: rubyzip
184
+ requirement: !ruby/object:Gem::Requirement
185
+ requirements:
186
+ - - ">="
187
+ - !ruby/object:Gem::Version
188
+ version: 1.1.6
189
+ - - "<"
190
+ - !ruby/object:Gem::Version
191
+ version: '4'
192
+ type: :runtime
193
+ prerelease: false
194
+ version_requirements: !ruby/object:Gem::Requirement
195
+ requirements:
196
+ - - ">="
197
+ - !ruby/object:Gem::Version
198
+ version: 1.1.6
199
+ - - "<"
200
+ - !ruby/object:Gem::Version
201
+ version: '4'
182
202
  description: fir.im command tool, support iOS and Android
183
203
  email:
184
204
  - atpking@gmail.com