fastlane-plugin-repack_ios 0.1.0 → 1.0.1

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
- SHA1:
3
- metadata.gz: 231bb054a4432cab544fb6325aa60b06dbe0fd67
4
- data.tar.gz: d6ed18ebe8d990ec51c0d96cc9a956b81ce9ea72
2
+ SHA256:
3
+ metadata.gz: b7603bb6257703b0a11931de5edc198daccc96a407713cfa1f0b91055d202a2c
4
+ data.tar.gz: dd1ef91f1f7badf2cc50726d1304b25b3324dd01d0be706c20ba892638851258
5
5
  SHA512:
6
- metadata.gz: 3f56acda3c50944b24fcea153ca4c451c11a0b945199808a74a89019503724d7fedc93d7cfa03973d574ea1ab3b7deb36ef9e892a6898962787a795d45ca911b
7
- data.tar.gz: 14618a0c843e60bbe900528de952566a319f9718d48dac0d46490bbd73f841a92cbb1f0ea42bb39b5327737685110b1904fc8d290045d5c766a780e82d886ac2
6
+ metadata.gz: 284aa9ca62d24dcc7dc8dcd0c328d55774bb18cdb3500a3dc20170faf15cecd54d3c9db3d9870e32c769945c311b6722b6a1fa473d31b8a6b01b88a635f0a6e2
7
+ data.tar.gz: 4c627c6116020dc7c1f516b438920747af3bee8a4c974d6ac2ba05d085a55734ddc9bbfa5dfeff3bae81ae90cf45a74c8364effc015211d7dbccc5bbf473338c
data/README.md CHANGED
@@ -1,6 +1,10 @@
1
- # repack_ios plugin
1
+ # repack-ios plugin
2
2
 
3
3
  [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-repack_ios)
4
+ [![Gem Version](https://badge.fury.io/rb/fastlane-plugin-repack_ios.svg)](https://badge.fury.io/rb/fastlane-plugin-repack_ios)
5
+ [![Downloads](https://img.shields.io/gem/dt/fastlane-plugin-repack_ios.svg?style=flat)](https://rubygems.org/gems/fastlane-plugin-repack_ios)
6
+ [![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/creaworks-labs/fastlane-plugin-repack-ios/blob/master/LICENSE)
7
+ [![creaworks-labs](https://circleci.com/gh/creaworks-labs/fastlane-plugin-repack-ios.svg?style=svg)](<LINK>)
4
8
 
5
9
  ## Getting Started
6
10
 
@@ -10,12 +14,49 @@ This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To
10
14
  fastlane add_plugin repack_ios
11
15
  ```
12
16
 
13
- ## About repack_ios
17
+ ## About repack-ios
14
18
 
15
- This plugin allows you to repack your existing .ipa packages with new assets or non-executable resources without rebuilding the native code. It supports fastlane's *sigh* and *match* actions to automatically detect provisioning profiles and certificates for resigning the modified ipa package. Also internally uses Gym configuration arguments to detect build related parameters like output directory etc.
19
+ This plugin allows you to re-pack your existing .ipa packages with new assets or non-executable resources without rebuilding the native code. It supports fastlane's *sigh* and *match* actions to automatically detect provisioning profiles and certificates for resigning the modified ipa package. Also internally uses Gym configuration arguments to detect build related parameters like output directory etc.
16
20
 
17
21
  You can use this plugin to modify your react-native js bundle without re-compiling the entire XCode project from the beginning. It significantly reduces the compilation time, especially useful for CI/CD based processes and also for your test automation.
18
22
 
23
+ ## Examples
24
+
25
+ The only requires arguments are *ipa* path for the pre-built package and *contents* path for the resources that would like to replace. Basic usage as follows:
26
+
27
+ ```ruby
28
+ repack_ios({ ipa: "./build/ios/TestApp.ipa", output_name: "TestApp", contents: "./build/react-native/" })
29
+ ```
30
+
31
+ You can also specify additional parameters to `repack_ios` action. Eg.
32
+
33
+ ```ruby
34
+ repack_ios({
35
+ ipa: "./build/ios/TestApp.ipa",
36
+ contents: "./build/react-native/",
37
+ match_type: "adhoc", # Optional if you use _sigh_ or _match_
38
+ bundle_id: "com.creaworks.fastlane-app.repacked",
39
+ bundle_version: ENV["CI_BUILD_NUMBER"]
40
+ })
41
+ ```
42
+
43
+ ## Parameters
44
+
45
+ | Key | Description | Default |
46
+ | ------------- |-----------------------| --------|
47
+ | ipa | Path to your original ipa file to modify | *Required* |
48
+ | output_name | The product name of the Xcode target | *Required* |
49
+ | contents | Path for the new contents | *Required* |
50
+ | app_identifier | The bundle identifier of your app | Default value read from Appfile's app_identifier key |
51
+ | entitlements | Path to the entitlement file to use, e.g. `myApp/MyApp.entitlements`| Default value can be resolved from *sigh* |
52
+ | display_name | Display name to force resigned ipa to use | _Inherited_ |
53
+ | version | Version number to force resigned ipa to use. Updates both `CFBundleShortVersionString` and `CFBundleVersion` values in `Info.plist`. Applies for main app and all nested apps or extensions | _Inherited_ |
54
+ | short_version | Short version string to force resigned ipa to use (`CFBundleShortVersionString`) | _Inherited_ |
55
+ | bundle_version | Bundle version to force resigned ipa to use (`CFBundleVersion`) | _Inherited_ |
56
+ | bundle_id | Set new bundle ID during resign (`CFBundleIdentifier`) | _Optional_ |
57
+ | match_type | Define the profile type | Optional if you use _sigh_ or _match_ |
58
+ | provisioning_profile | Path to your provisioning_profile. | Optional if you use _sigh_ or _match_ |
59
+
19
60
  ## Run tests for this plugin
20
61
 
21
62
  To run both the tests, and code style validation, run
@@ -47,4 +88,4 @@ _fastlane_ is the easiest way to automate beta deployments and releases for your
47
88
 
48
89
  ## License
49
90
 
50
- MIT © [omerduzyol](https://github.com/omerduzyol)
91
+ MIT © [omerduzyol](https://github.com/omerduzyol)
@@ -1,4 +1,6 @@
1
1
  require 'fastlane/action'
2
+ require 'gym'
3
+ require 'match'
2
4
  require_relative '../helper/repack_ios_helper'
3
5
 
4
6
  module Fastlane
@@ -14,7 +16,7 @@ module Fastlane
14
16
  UI.message("Parameter Contents Path: #{params[:contents]}")
15
17
  UI.message("Parameter IPA Path: #{params[:ipa]}")
16
18
 
17
- if params[:ipa].nil?
19
+ if params[:ipa].nil? || params[:output_name].nil?
18
20
  UI.important("Parameter ipa is empty, trying to resolve Gym configuration...")
19
21
 
20
22
  Gym.config = FastlaneCore::Configuration.create(Gym::Options.available_options, {})
@@ -29,6 +31,7 @@ module Fastlane
29
31
  UI.user_error!("Resolved ipa file: #{File.expand_path(ipa_path)} is not exists. Please provide ipa path.") unless File.exist?(ipa_path)
30
32
  else
31
33
  ipa_path = params[:ipa]
34
+ output_name = params[:output_name]
32
35
  end
33
36
 
34
37
  ipa_original_path = Helper::RepackIosHelper.unpack_and_repack(output_name, ipa_path, params[:contents])
@@ -37,9 +40,11 @@ module Fastlane
37
40
 
38
41
  sigh_profile_type = Actions.lane_context[SharedValues::SIGH_PROFILE_TYPE]
39
42
 
40
- unless sigh_profile_type.nil?
41
- UI.important("Match type parameters obtained from sigh profile context!")
42
- params[:match_type] = sigh_profile_type.sub!('-', '')
43
+ if params[:match_type].nil?
44
+ unless sigh_profile_type.nil?
45
+ UI.important("Match type parameters obtained from sigh profile context!")
46
+ params[:match_type] = sigh_profile_type.sub!('-', '')
47
+ end
43
48
  end
44
49
 
45
50
  # check match_type is passed?
@@ -174,6 +179,11 @@ module Fastlane
174
179
  UI.user_error!("Unsupported environment #{value}, must be in #{Match.environments.join(', ')}")
175
180
  end
176
181
  end),
182
+ FastlaneCore::ConfigItem.new(key: :output_name,
183
+ env_name: "FL_REPACK_IOS_OUTPUT_NAME",
184
+ description: "The name of the resulting app file inside the ipa file",
185
+ is_string: true,
186
+ optional: true),
177
187
  FastlaneCore::ConfigItem.new(key: :provisioning_profile,
178
188
  env_name: "FL_REPACK_IOS_PROVISIONING_PROFILE",
179
189
  description: "Path to your provisioning_profile. Optional if you use _sigh_ or _match_",
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module RepackIos
3
- VERSION = "0.1.0"
3
+ VERSION = "1.0.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-repack_ios
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Omer Duzyol
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-24 00:00:00.000000000 Z
11
+ date: 2021-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: zip
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: pry
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -181,8 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
181
167
  - !ruby/object:Gem::Version
182
168
  version: '0'
183
169
  requirements: []
184
- rubyforge_project:
185
- rubygems_version: 2.5.2.3
170
+ rubygems_version: 3.0.8
186
171
  signing_key:
187
172
  specification_version: 4
188
173
  summary: Enables your build pipeline to repack your pre-built ipa with new assets