fastlane-plugin-codepush 0.2.0 → 0.2.1
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 +4 -4
- data/README.md +3 -212
- data/lib/fastlane/plugin/codepush/actions/{codepush_exists_deployment_action copy.rb → codepush_exists_deployment_action.rb} +0 -0
- data/lib/fastlane/plugin/codepush/actions/codepush_get_deployment_key_action.rb +3 -2
- data/lib/fastlane/plugin/codepush/actions/codepush_logout_action.rb +1 -2
- data/lib/fastlane/plugin/codepush/helper/codepush_login_helper.rb +2 -0
- data/lib/fastlane/plugin/codepush/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 642b9b22a69a1816aa13ab865ff73acbebe073763997897a8e21a25bf9f15f77
|
|
4
|
+
data.tar.gz: bd98715d2203aa9601dfb44b98c48d677ac3c9208c3830422ccc15a4e1f18acc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 31ac44bfd59d11e6a5a7539fda2934a0b0d42b64354231dbe200cf26a24915cf1e95b0e323af8297c8770f32e77e59249e53bf70a1d7fac2413491713865c06d
|
|
7
|
+
data.tar.gz: 3d21cb7b6e2a69b41a39c6d918101926c1f030d350002e3e8cf3ec94e3a39a32a0b9315f912f9649d0f86dd11ceff2306c46cb0749f98277910db32684887034
|
data/README.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# Fastlane CodePush plugin
|
|
2
2
|
|
|
3
|
+
[](https://travis-ci.com/Pranit-Harekar/fastlane-plugin-codepush)
|
|
3
4
|
[](https://rubygems.org/gems/fastlane-plugin-codepush)
|
|
4
5
|
|
|
5
|
-
[📚Documentation](https://
|
|
6
|
+
[📚Documentation](https://github.com/Pranit-Harekar/fastlane-plugin-codepush/wiki)
|
|
6
7
|
|
|
7
8
|
## Prerequisites
|
|
8
9
|
|
|
@@ -26,217 +27,7 @@ This is a Fastlane plugin for App Center CodePush service.
|
|
|
26
27
|
|
|
27
28
|
### List of available actions
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
[Log in to App Center](https://docs.microsoft.com/en-us/appcenter/distribution/codepush/cli#account-management) to access CodePush service.
|
|
32
|
-
|
|
33
|
-
```ruby
|
|
34
|
-
codepush_login
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
| Option | Description | Environment Variable | Default |
|
|
38
|
-
| ----------- | --------------------------------------------------------------------------------------------------- | ---------------------- | ------- |
|
|
39
|
-
| login_token | App center login token to access CodePush service, optional if ENV['APP_CENTER_LOGIN_TOKEN'] is set | APP_CENTER_LOGIN_TOKEN | |
|
|
40
|
-
| enforce | Enforce logout before login | | false |
|
|
41
|
-
|
|
42
|
-
#### 2. `codepush_logout`
|
|
43
|
-
|
|
44
|
-
[Log out of App Center](https://docs.microsoft.com/en-us/appcenter/distribution/codepush/cli#account-management)
|
|
45
|
-
|
|
46
|
-
```ruby
|
|
47
|
-
codepush_logout
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
#### 3. `codepush_release_react`
|
|
51
|
-
|
|
52
|
-
CodePush [release-react](https://docs.microsoft.com/en-us/appcenter/distribution/codepush/cli#releasing-updates-react-native) action
|
|
53
|
-
|
|
54
|
-
This action lets you release React Native Javascript bundles to a specific CodePush deployment.
|
|
55
|
-
|
|
56
|
-
```ruby
|
|
57
|
-
codepush_release_react(
|
|
58
|
-
app_name: "pharekar/MyAwesomeApp",
|
|
59
|
-
disable_duplicate_release_error: true
|
|
60
|
-
)
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
| Option | Description | Environment Variable | Default |
|
|
64
|
-
| ------------------------------- | ---------------------------------------------------------------------------------- | -------------------- | ------- |
|
|
65
|
-
| app_name | Name of the App Center app, optional if ENV['APP_CENTER_APP_NAME'] is set | APP_CENTER_APP_NAME | |
|
|
66
|
-
| execution_dir_path | Release React CLI command execution dir path | | ./ |
|
|
67
|
-
| target_binary_version | Store/binary version of the app you are releasing the update for | | "\*" |
|
|
68
|
-
| deployment_name | Name of your deployment | | Staging |
|
|
69
|
-
| output_dir | Output directory | | |
|
|
70
|
-
| sourcemap_output | Relative path to where the generated JS bundle's source map file should be written | | |
|
|
71
|
-
| plist_file_prefix | File name prefix of the Info.plist file | | |
|
|
72
|
-
| plist_file | (iOS) Relative path to the Info.plist file | | |
|
|
73
|
-
| gradle_file | (Android) Relative path to the build.gradle file | | |
|
|
74
|
-
| description | An optional change log for the deployment | | |
|
|
75
|
-
| mandatory | Specify whether the update should be considered mandatory or not | | false |
|
|
76
|
-
| disabled | Specify whether the update should be downloadable by end users or not | | false |
|
|
77
|
-
| rollout_percentage | Percentage of users that should be eligible to receive this update | | |
|
|
78
|
-
| disable_duplicate_release_error | Specify whether duplicate release error should be disabled or not | | false |
|
|
79
|
-
| disable_telemetry | Specify whether telemetry should be disabled or not | | false |
|
|
80
|
-
| version | Version | | |
|
|
81
|
-
| private_key_path | Relative path to private key | | |
|
|
82
|
-
| entry_file | Relative path to the app's root/entry JavaScript file | | |
|
|
83
|
-
| development | Specify whether to generate an unminified, development JS bundle | | |
|
|
84
|
-
| bundle_name | File name that should be used for the generated JS bundle | | |
|
|
85
|
-
| dry_run | Print the command that would be run, and don't run it | | false |
|
|
86
|
-
|
|
87
|
-
#### 4. `codepush_promote`
|
|
88
|
-
|
|
89
|
-
CodePush [promote deployment](https://docs.microsoft.com/en-us/appcenter/distribution/codepush/cli#promoting-updates) action
|
|
90
|
-
|
|
91
|
-
This action lets you promote updates from a source deployment to a destination deployment.
|
|
92
|
-
|
|
93
|
-
```ruby
|
|
94
|
-
codepush_promote(
|
|
95
|
-
app_name: "pharekar/MyAwesomeApp",
|
|
96
|
-
source_deployment_name: "Staging",
|
|
97
|
-
destination_deployment_name: "Production",
|
|
98
|
-
)
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
| Option | Description | Environment Variable | Default |
|
|
102
|
-
| ------------------------------- | ------------------------------------------------------------------------- | -------------------- | ------- |
|
|
103
|
-
| app_name | Name of the App Center app, optional if ENV['APP_CENTER_APP_NAME'] is set | APP_CENTER_APP_NAME | |
|
|
104
|
-
| execution_dir_path | Promote CLI command execution dir path | | ./ |
|
|
105
|
-
| target_binary_version | Store/binary version of the app you are releasing the update for | | "\*" |
|
|
106
|
-
| source_deployment_name | Source deployment name | | |
|
|
107
|
-
| destination_deployment_name | Destination deployment name | | |
|
|
108
|
-
| description | An optional change log for the deployment | | |
|
|
109
|
-
| rollout_percentage | Percentage of users that should be eligible to receive this update | | |
|
|
110
|
-
| disable_duplicate_release_error | Specify whether duplicate release error should be disabled or not | | false |
|
|
111
|
-
| disable_telemetry | Specify whether telemetry should be disabled or not | | false |
|
|
112
|
-
| dry_run | Print the command that would be run, and don't run it | | false |
|
|
113
|
-
|
|
114
|
-
#### 5. `codepush_add_deployment`
|
|
115
|
-
|
|
116
|
-
CodePush [add deployment](https://docs.microsoft.com/en-us/appcenter/distribution/codepush/cli#deployment-management) action
|
|
117
|
-
|
|
118
|
-
This action lets you add new CodePush deployment.
|
|
119
|
-
|
|
120
|
-
```ruby
|
|
121
|
-
codepush_add_deployment(
|
|
122
|
-
app_name: "pharekar/MyAwesomeApp",
|
|
123
|
-
deployment_name: "Alpha"
|
|
124
|
-
)
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
| Option | Description | Environment Variable | Default |
|
|
128
|
-
| ------------------ | ------------------------------------------------------------------------- | -------------------- | ------- |
|
|
129
|
-
| app_name | Name of the App Center app, optional if ENV['APP_CENTER_APP_NAME'] is set | APP_CENTER_APP_NAME | |
|
|
130
|
-
| execution_dir_path | Release React CLI command execution dir path | | ./ |
|
|
131
|
-
| deployment_name | Deployment name | | |
|
|
132
|
-
| dry_run | Print the command that would be run, and don't run it | | false |
|
|
133
|
-
|
|
134
|
-
#### 6. `codepush_remove_deployment`
|
|
135
|
-
|
|
136
|
-
CodePush [remove deployment](https://docs.microsoft.com/en-us/appcenter/distribution/codepush/cli#deployment-management) action
|
|
137
|
-
|
|
138
|
-
This action lets you remove CodePush deployment.
|
|
139
|
-
|
|
140
|
-
```ruby
|
|
141
|
-
codepush_remove_deployment(
|
|
142
|
-
app_name: "pharekar/MyAwesomeApp",
|
|
143
|
-
deployment_name: "Alpha"
|
|
144
|
-
)
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
| Option | Description | Environment Variable | Default |
|
|
148
|
-
| ------------------ | ------------------------------------------------------------------------- | -------------------- | ------- |
|
|
149
|
-
| app_name | Name of the App Center app, optional if ENV['APP_CENTER_APP_NAME'] is set | APP_CENTER_APP_NAME | |
|
|
150
|
-
| execution_dir_path | Release React CLI command execution dir path | | ./ |
|
|
151
|
-
| deployment_name | Deployment name | | |
|
|
152
|
-
| dry_run | Print the command that would be run, and don't run it | | false |
|
|
153
|
-
|
|
154
|
-
#### 7. `codepush_rename_deployment`
|
|
155
|
-
|
|
156
|
-
CodePush [rename deployment](https://docs.microsoft.com/en-us/appcenter/distribution/codepush/cli#deployment-management) action
|
|
157
|
-
|
|
158
|
-
This action lets you rename CodePush deployment.
|
|
159
|
-
|
|
160
|
-
```ruby
|
|
161
|
-
codepush_rename_deployment(
|
|
162
|
-
app_name: "pharekar/MyAwesomeApp",
|
|
163
|
-
deployment_name: "Alpha",
|
|
164
|
-
new_deployment_name: "Internal-Alpha"
|
|
165
|
-
)
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
| Option | Description | Environment Variable | Default |
|
|
169
|
-
| ------------------- | ------------------------------------------------------------------------- | -------------------- | ------- |
|
|
170
|
-
| app_name | Name of the App Center app, optional if ENV['APP_CENTER_APP_NAME'] is set | APP_CENTER_APP_NAME | |
|
|
171
|
-
| execution_dir_path | Release React CLI command execution dir path | | ./ |
|
|
172
|
-
| deployment_name | Deployment name | | |
|
|
173
|
-
| new_deployment_name | New deployment name | | |
|
|
174
|
-
| dry_run | Print the command that would be run, and don't run it | | false |
|
|
175
|
-
|
|
176
|
-
#### 8. `codepush_list_deployment`
|
|
177
|
-
|
|
178
|
-
CodePush [list deployment](https://docs.microsoft.com/en-us/appcenter/distribution/codepush/cli#deployment-management) action
|
|
179
|
-
|
|
180
|
-
This action lets you list all CodePush deployment.
|
|
181
|
-
|
|
182
|
-
```ruby
|
|
183
|
-
codepush_list_deployment(
|
|
184
|
-
app_name: "pharekar/MyAwesomeApp"
|
|
185
|
-
)
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
| Option | Description | Environment Variable | Default |
|
|
189
|
-
| ------------------ | ------------------------------------------------------------------------- | -------------------- | ------- |
|
|
190
|
-
| app_name | Name of the App Center app, optional if ENV['APP_CENTER_APP_NAME'] is set | APP_CENTER_APP_NAME | |
|
|
191
|
-
| execution_dir_path | Release React CLI command execution dir path | | ./ |
|
|
192
|
-
| dry_run | Print the command that would be run, and don't run it | | false |
|
|
193
|
-
|
|
194
|
-
#### 9. `codepush_exists_deployment`
|
|
195
|
-
|
|
196
|
-
This action lets check if given CodePush deployment exists. Returns boolean value.
|
|
197
|
-
|
|
198
|
-
```ruby
|
|
199
|
-
codepush_exists_deployment(
|
|
200
|
-
app_name: "pharekar/MyAwesomeApp",
|
|
201
|
-
deployment_name: "Alpha"
|
|
202
|
-
)
|
|
203
|
-
|
|
204
|
-
## returns true if 'Alpha' deployment exists otherwise false
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
| Option | Description | Environment Variable | Default |
|
|
208
|
-
| ------------------ | ------------------------------------------------------------------------- | -------------------- | ------- |
|
|
209
|
-
| app_name | Name of the App Center app, optional if ENV['APP_CENTER_APP_NAME'] is set | APP_CENTER_APP_NAME | |
|
|
210
|
-
| execution_dir_path | Release React CLI command execution dir path | | ./ |
|
|
211
|
-
| deployment_name | Deployment name | | |
|
|
212
|
-
| dry_run | Print the command that would be run, and don't run it | | false |
|
|
213
|
-
|
|
214
|
-
#### 10. `codepush_get_deployment_key`
|
|
215
|
-
|
|
216
|
-
This action returns CodePush deployment key given deployment name. If deployment does not exists it returns `nil`
|
|
217
|
-
|
|
218
|
-
```ruby
|
|
219
|
-
codepush_get_deployment_key(
|
|
220
|
-
app_name: "pharekar/MyAwesomeApp",
|
|
221
|
-
deployment_name: "Alpha"
|
|
222
|
-
)
|
|
223
|
-
|
|
224
|
-
## 1243453jksau2113l2h1k323h1829ebj
|
|
225
|
-
|
|
226
|
-
codepush_get_deployment_key(
|
|
227
|
-
app_name: "pharekar/MyAwesomeApp",
|
|
228
|
-
deployment_name: "foo"
|
|
229
|
-
)
|
|
230
|
-
|
|
231
|
-
## nil
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
| Option | Description | Environment Variable | Default |
|
|
235
|
-
| ------------------ | ------------------------------------------------------------------------- | -------------------- | ------- |
|
|
236
|
-
| app_name | Name of the App Center app, optional if ENV['APP_CENTER_APP_NAME'] is set | APP_CENTER_APP_NAME | |
|
|
237
|
-
| execution_dir_path | Release React CLI command execution dir path | | ./ |
|
|
238
|
-
| deployment_name | Deployment name | | |
|
|
239
|
-
| dry_run | Print the command that would be run, and don't run it | | false |
|
|
30
|
+
[Checkout docs](https://github.com/Pranit-Harekar/fastlane-plugin-codepush/wiki)
|
|
240
31
|
|
|
241
32
|
## Example
|
|
242
33
|
|
|
File without changes
|
|
@@ -11,12 +11,13 @@ module Fastlane
|
|
|
11
11
|
## params
|
|
12
12
|
command += "-a #{params[:app_name]} "
|
|
13
13
|
command += "--displayKeys "
|
|
14
|
-
command += "| grep '#{params[:deployment_name]}'"
|
|
15
14
|
|
|
16
15
|
if params[:dry_run]
|
|
17
16
|
UI.message('Dry run!'.red + ' Would have run: ' + command + "\n")
|
|
18
17
|
else
|
|
19
|
-
sh(command.to_s)
|
|
18
|
+
result = sh(command.to_s)
|
|
19
|
+
m = result.match(/#{params[:deployment_name]}[^│]+│[^│]+(?<key>[\w_-]{37})/)
|
|
20
|
+
return m[:key]
|
|
20
21
|
end
|
|
21
22
|
else
|
|
22
23
|
UI.important("🙅♀️ Deployment '#{params[:deployment_name]}' does not exists!")
|
|
@@ -10,6 +10,7 @@ module Fastlane
|
|
|
10
10
|
"appcenter login --token #{login_token}",
|
|
11
11
|
print_command: false
|
|
12
12
|
)
|
|
13
|
+
UI.message("🎉Logged in successfully")
|
|
13
14
|
rescue StandardError
|
|
14
15
|
UI.user_error!(
|
|
15
16
|
"Something went wrong during App Center login!! Please ensure login token #{login_token} is correct"
|
|
@@ -18,6 +19,7 @@ module Fastlane
|
|
|
18
19
|
|
|
19
20
|
def self.logout
|
|
20
21
|
Action.sh("appcenter logout")
|
|
22
|
+
UI.message("✅Logged out successfully")
|
|
21
23
|
end
|
|
22
24
|
|
|
23
25
|
def self.is_logged_in
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fastlane-plugin-codepush
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Pranit Harekar
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-05-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: pry
|
|
@@ -146,7 +146,7 @@ files:
|
|
|
146
146
|
- README.md
|
|
147
147
|
- lib/fastlane/plugin/codepush.rb
|
|
148
148
|
- lib/fastlane/plugin/codepush/actions/codepush_add_deployment_action.rb
|
|
149
|
-
- lib/fastlane/plugin/codepush/actions/codepush_exists_deployment_action
|
|
149
|
+
- lib/fastlane/plugin/codepush/actions/codepush_exists_deployment_action.rb
|
|
150
150
|
- lib/fastlane/plugin/codepush/actions/codepush_get_deployment_key_action.rb
|
|
151
151
|
- lib/fastlane/plugin/codepush/actions/codepush_list_deployment_action.rb
|
|
152
152
|
- lib/fastlane/plugin/codepush/actions/codepush_login_action.rb
|
|
@@ -176,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
176
176
|
- !ruby/object:Gem::Version
|
|
177
177
|
version: '0'
|
|
178
178
|
requirements: []
|
|
179
|
-
rubygems_version: 3.
|
|
179
|
+
rubygems_version: 3.1.2
|
|
180
180
|
signing_key:
|
|
181
181
|
specification_version: 4
|
|
182
182
|
summary: "Fastlane plugin for App Center CodePush actions \U0001F680"
|