fastlane-plugin-appcenter 1.11.1 → 2.0.0

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: b110405fe9e84494ddb201d8b05738652c29493a2d86cf33a83f63e3843c650f
4
- data.tar.gz: a6a582ac374e02c45a5285b6960d8f0da7a44bb7f4375c2d001d25a3aad71d21
3
+ metadata.gz: 7d5bec07c7933960b0bfdb0bba55430e4d72a248266b5f9c6b19f2ff9faae1b8
4
+ data.tar.gz: c6419bab9a2cd682f16cfe08beba4c34d65e994b07b4daca7e8db685c3d9160b
5
5
  SHA512:
6
- metadata.gz: 6e30d4329779b399e127a8f31b2828ce307c586ea06539970d3b1ed338db5a1c4222364f269aab763fdb97b18abfc73de67ea0f1928397a3b8dc4b300998afd4
7
- data.tar.gz: 766537e348299e02cd0e71f21502884487e76e333941e291229167e4554193d0284faff27eae2f91da24fc9b6a39425bc999e489001cefbd8582485c3f996b78
6
+ metadata.gz: 14c273eb0477916f7c67a00ddd07b89c4422deed716eb5b84c767df206eae11e1e51b727981ec1b7b0106ec4daba2dcf5983cd37ce011fff2f7fb2eebcaa60d2
7
+ data.tar.gz: 4771c6ef66b34209e9b61986d685cc3f82cd0fa30de705e8164e85f81f13a33c2645795f139abd6e6616de46eb6ebd953353b24f662f12dd094bcd7b2d699e32
data/README.md CHANGED
@@ -23,6 +23,8 @@ With [App Center](https://appcenter.ms) you can continuously build, test, releas
23
23
 
24
24
  `appcenter_fetch_version_number` allows you to obtain the latest version number (short or full) for an app. This is useful for tasks such as getting the latest version of an app so that an increment action can take place on CI, or checking that an upload has been successful.
25
25
 
26
+ `appcenter_codepush_release_react` allows you to deploy app updates via CodePush.
27
+
26
28
  ## Usage
27
29
 
28
30
  To get started, first, [obtain an API token](https://appcenter.ms/settings/apitokens) in App Center. The API Token is used to authenticate with the App Center API in each call.
@@ -63,6 +65,15 @@ The `appcenter_fetch_version_number` returns a hash that contains the id, the ve
63
65
  {"id"=>588, "version"=>"1.2.0", "build_number"=>"1615"}
64
66
  ```
65
67
 
68
+ ```ruby
69
+ appcenter_codepush_release_react(
70
+ api_token: "<appcenter token>",
71
+ owner_name: "<appcenter account name of the owner of the app (username or organization URL name)>",
72
+ app_name: "<appcenter app name (as seen in app URL)>",
73
+ deployment: "Staging"
74
+ )
75
+ ```
76
+
66
77
  ### Help
67
78
 
68
79
  Once installed, information and help for an action can be printed out with this command:
@@ -134,6 +145,24 @@ Here is the list of all existing parameters:
134
145
  | `app_name` <br/> `APPCENTER_APP_NAME` | App name as found in the App's URL in App Center. If there is no app with such name, you will be prompted to create one |
135
146
  | `version` <br/> `APPCENTER_APP_VERSION` | App version to get the last release for instead of the last release of all versions |
136
147
 
148
+ #### `appcenter_codepush_release_react`
149
+ | Key & Env Var | Description |
150
+ |-----------------|--------------------|
151
+ | `api_token` <br/> `APPCENTER_API_TOKEN` | API Token for App Center |
152
+ | `owner_name` <br/> `APPCENTER_OWNER_NAME` | Owner name, as found in the App's URL in App Center |
153
+ | `app_name` <br/> `APPCENTER_APP_NAME` | App name as found in the App's URL in App Center. If there is no app with such name, you will be prompted to create one |
154
+ | `deployment` <br/> `APPCENTER_CODEPUSH_DEPLOYMENT` | Name of deployment track (default: `Staging`) |
155
+ | `target_version` <br/> `APPCENTER_CODEPUSH_TARGET_VERSION` | Target binary app version |
156
+ | `mandatory` <br/> `APPCENTER_CODEPUSH_MANDATORY` | Specifies whether the update should be mandatory (default: `true`) |
157
+ | `description` <br/> `APPCENTER_CODEPUSH_DESCRIPTION` | Description of CodePush release |
158
+ | `dry_run` <br/> `APPCENTER_CODEPUSH_DRY_RUN` | Print command that would be run, don't run it (default: `false`) |
159
+ | `disabled` <br/> `APPCENTER_CODEPUSH_DISABLED` | Specifies whether this release should not be immediately available for download (default: `false`) |
160
+ | `no_duplicate_release_error` <br/> `APPCENTER_CODEPUSH_NO_DUPLICATE_ERROR` | Specifies whether to ignore errors if bundle is identical to the latest codepush release (default: `false`) |
161
+ | `bundle_name` <br/> `APPCENTER_CODEPUSH_BUNDLE_NAME` | Specifies the name of the bundle file |
162
+ | `output_dir` <br/> `APPCENTER_CODEPUSH_OUTPUT` | Specifies path to where the bundle and sourcemap should be written |
163
+ | `sourcemap_output` <br/> `APPCENTER_CODEPUSH_SOURCEMAP_OUTPUT` | Specifies path to write sourcemaps to |
164
+ | `development` <br/> `APPCENTER_CODEPUH_DEVELOPMENT` | Specifies whether to generate dev or release build (default: `false`) |
165
+
137
166
  ## Example
138
167
 
139
168
  Check out this [example `Fastfile`](fastlane/Fastfile) to see how to use the `appcenter_upload` action. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
@@ -186,4 +215,4 @@ Check out [SECURITY.md](SECURITY.md) for any security concern with this project.
186
215
 
187
216
  ## Contact
188
217
 
189
- We're on Twitter as [@vsappcenter](https://www.twitter.com/vsappcenter). Additionally you can reach out to us on the [App Center](https://appcenter.ms/apps) portal. Open the "?" menu on the top right corner of screen, then use "Contact support" to file a support ticket. Our support team is there to answer your questions and help you solve your problems.
218
+ We're on Twitter as [@vsappcenter](https://www.twitter.com/vsappcenter). Additionally you can reach out to us on the [App Center](https://appcenter.ms/apps) portal. Open the "?" menu on the top right corner of screen, then use "Contact support" to file a support ticket. Our support team is there to answer your questions and help you solve your problems.
@@ -0,0 +1,156 @@
1
+ require 'fastlane_core/ui/ui'
2
+
3
+ module Fastlane
4
+ UI = FastlaneCore::UI unless Fastlane.const_defined?("UI")
5
+
6
+ module Actions
7
+ class AppcenterCodepushReleaseReactAction < Action
8
+ def self.description
9
+ "CodePush release react action"
10
+ end
11
+
12
+ def self.authors
13
+ ["Ivan Sokolovskii"]
14
+ end
15
+
16
+ def self.run(params)
17
+ app = params[:app_name]
18
+ owner = params[:owner_name]
19
+ token = params[:api_token]
20
+ deployment = params[:deployment]
21
+ dev = params[:development]
22
+ description = params[:description]
23
+ mandatory = params[:mandatory]
24
+ version = params[:target_version]
25
+ disabled = params[:disabled]
26
+ no_errors = params[:no_duplicate_release_error]
27
+ bundle = params[:bundle_name]
28
+ output = params[:output_dir]
29
+ sourcemap_output = params[:sourcemap_output]
30
+ dry_run = params[:dry_run]
31
+
32
+ command = "appcenter codepush release-react --token #{token} --app #{owner}/#{app} --deployment-name #{deployment} --development #{dev} "
33
+ if description
34
+ command += "--description \"#{description}\" "
35
+ end
36
+ if mandatory
37
+ command += "--mandatory "
38
+ end
39
+ if version
40
+ command += "--target-binary-version #{version} "
41
+ end
42
+ if disabled
43
+ command += "--disabled "
44
+ end
45
+ if no_errors
46
+ command += "--disable-duplicate-release-error "
47
+ end
48
+ if bundle
49
+ command += "--bundle-name #{bundle} "
50
+ end
51
+ if output
52
+ command += "--output-dir #{output} "
53
+ end
54
+ if sourcemap_output
55
+ command += "--sourcemap-output #{sourcemap_output} "
56
+ end
57
+ if dry_run
58
+ UI.message("Dry run!".red + " Would have run: " + command + "\n")
59
+ else
60
+ sh(command.to_s)
61
+ end
62
+ end
63
+
64
+ def self.available_options
65
+ [
66
+ FastlaneCore::ConfigItem.new(key: :api_token,
67
+ type: String,
68
+ env_name: "APPCENTER_API_TOKEN",
69
+ description: "API Token for App Center Access",
70
+ verify_block: proc do |value|
71
+ UI.user_error!("No API token for App Center given, pass using `api_token: 'token'`") unless value && !value.empty?
72
+ end),
73
+ FastlaneCore::ConfigItem.new(key: :owner_name,
74
+ type: String,
75
+ env_name: "APPCENTER_OWNER_NAME",
76
+ description: "Name of the owner of the application on App Center",
77
+ verify_block: proc do |value|
78
+ UI.user_error!("No owner name for App Center given, pass using `owner_name: 'owner name'`") unless value && !value.empty?
79
+ end),
80
+ FastlaneCore::ConfigItem.new(key: :app_name,
81
+ type: String,
82
+ env_name: "APPCENTER_APP_NAME",
83
+ description: "Name of the application on App Center",
84
+ verify_block: proc do |value|
85
+ UI.user_error!("No app name for App Center given, pass using `app_name: 'app name'`") unless value && !value.empty?
86
+ end),
87
+ FastlaneCore::ConfigItem.new(key: :deployment,
88
+ type: String,
89
+ env_name: "APPCENTER_CODEPUSH_DEPLOYMENT",
90
+ optional: true,
91
+ default_value: "Staging",
92
+ description: "Deployment name for releasing to"),
93
+ FastlaneCore::ConfigItem.new(key: :target_version,
94
+ type: String,
95
+ env_name: "APPCENTER_CODEPUSH_TARGET_VERSION",
96
+ optional: true,
97
+ description: "Target binary version for example 1.0.1"),
98
+ FastlaneCore::ConfigItem.new(key: :mandatory,
99
+ type: Boolean,
100
+ env_name: "APPCENTER_CODEPUSH_MANDATORY",
101
+ default_value: true,
102
+ optional: true,
103
+ description: "mandatory update or not"),
104
+ FastlaneCore::ConfigItem.new(key: :description,
105
+ type: String,
106
+ env_name: "APPCENTER_CODEPUSH_DESCRIPTION",
107
+ optional: true,
108
+ description: "Release description for CodePush"),
109
+ FastlaneCore::ConfigItem.new(key: :dry_run,
110
+ type: Boolean,
111
+ env_name: "APPCENTER_CODEPUSH_DRY_RUN",
112
+ default_value: false,
113
+ optional: true,
114
+ description: "Print the command that would be run, and don't run it"),
115
+ FastlaneCore::ConfigItem.new(key: :disabled,
116
+ type: Boolean,
117
+ env_name: "APPCENTER_CODEPUSH_DISABLED",
118
+ default_value: false,
119
+ optional: true,
120
+ description: "Specifies whether this release should be immediately downloadable"),
121
+ FastlaneCore::ConfigItem.new(key: :no_duplicate_release_error,
122
+ type: Boolean,
123
+ env_name: "APPCENTER_CODEPUSH_NO_DUPLICATE_ERROR",
124
+ default_value: false,
125
+ optional: true,
126
+ description: "Specifies whether to return an error if the main bundle is identical to the latest codepush release"),
127
+ FastlaneCore::ConfigItem.new(key: :bundle_name,
128
+ type: String,
129
+ env_name: "APPCENTER_CODEPUSH_BUNDLE_NAME",
130
+ optional: true,
131
+ description: "Specifies the name of the bundle file"),
132
+ FastlaneCore::ConfigItem.new(key: :output_dir,
133
+ type: String,
134
+ env_name: "APPCENTER_CODEPUSH_OUTPUT",
135
+ optional: true,
136
+ description: "Specifies path to where the bundle and sourcemap should be written"),
137
+ FastlaneCore::ConfigItem.new(key: :sourcemap_output,
138
+ type: String,
139
+ env_name: "APPCENTER_CODEPUSH_SOURCEMAP_OUTPUT",
140
+ optional: true,
141
+ description: "Specifies path to write sourcemap to"),
142
+ FastlaneCore::ConfigItem.new(key: :development,
143
+ type: Boolean,
144
+ env_name: "APPCENTER_CODEPUSH_DEVELOPMENT",
145
+ optional: true,
146
+ default_value: false,
147
+ description: "Specifies whether to generate a dev build")
148
+ ]
149
+ end
150
+
151
+ def self.is_supported?(platform)
152
+ [:ios, :android].include?(platform)
153
+ end
154
+ end
155
+ end
156
+ end
@@ -62,7 +62,7 @@ module Fastlane
62
62
  col_sep: "\t") do |csv|
63
63
 
64
64
  devices.each do |device|
65
- CSV.parse(device, { col_sep: "\t", headers: true }) do |row|
65
+ CSV.parse(device, col_sep: "\t", headers: true) do |row|
66
66
  csv << row
67
67
  end
68
68
  end
@@ -955,7 +955,7 @@ module Fastlane
955
955
 
956
956
  # add new created app to existing distribution group
957
957
  def self.add_new_app_to_distribution_group(api_token:, owner_name:, app_name:, destination_name:)
958
- url = URI.escape("/v0.1/orgs/#{owner_name}/distribution_groups/#{destination_name}/apps")
958
+ url = URI::Parser.new.escape("/v0.1/orgs/#{owner_name}/distribution_groups/#{destination_name}/apps")
959
959
  body = {
960
960
  apps: [
961
961
  { name: app_name }
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Appcenter
3
- VERSION = "1.11.1"
3
+ VERSION = "2.0.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-appcenter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Microsoft Corporation
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-09 00:00:00.000000000 Z
11
+ date: 2022-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -131,6 +131,7 @@ files:
131
131
  - LICENSE
132
132
  - README.md
133
133
  - lib/fastlane/plugin/appcenter.rb
134
+ - lib/fastlane/plugin/appcenter/actions/appcenter_codepush_release_react.rb
134
135
  - lib/fastlane/plugin/appcenter/actions/appcenter_fetch_devices_action.rb
135
136
  - lib/fastlane/plugin/appcenter/actions/appcenter_fetch_version_number.rb
136
137
  - lib/fastlane/plugin/appcenter/actions/appcenter_upload_action.rb
@@ -155,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
155
156
  - !ruby/object:Gem::Version
156
157
  version: '0'
157
158
  requirements: []
158
- rubygems_version: 3.0.3
159
+ rubygems_version: 3.1.2
159
160
  signing_key:
160
161
  specification_version: 4
161
162
  summary: Fastlane plugin for App Center