fastlane-plugin-codemagic 0.1.2 → 0.1.3

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: 447c4faeaa38767441c6c58a26aef4d389d0f5e6db5dbd3a9ac9131f21295bde
4
- data.tar.gz: d20a7530e3b51225c230e45376eb2c6f2a21e53139f16cf6389c5ff9473f1900
3
+ metadata.gz: d5b9a57e32523dc71390364d5805c5f7bc8df714a7b66bee1243be222bfa61fe
4
+ data.tar.gz: 83d9b6db6096e1fb0c5814d60edc5a62dcd87150768c7d401fa9040121de958d
5
5
  SHA512:
6
- metadata.gz: bd9ffdc65bd15d71354a15a5a4660324e715ac98d7c2f7e30a0809c67d6a8e6b198e42a07708023f9c0d6c0778bcab5edee5786944bfc088eb90a4215e0f715b
7
- data.tar.gz: 301f4caeaa07d7e3ad7f4a050e87e8f6244c4d24dcb74686281bcdce53f14ed46b30ab9844ee349ed588b3ac09043d219be2d18228f2e9d0ede4dcc530085a2b
6
+ metadata.gz: ff15f2a81cd0b730e131369674ad5a0995174a2cdb1ac523f5cbae1054c8e4c80950dbcec22fdef97fe41d78dc0daf709905bcde6e6af9b6a232425a7222289c
7
+ data.tar.gz: c3f24a67d7826d7214455d4043ee6328f1ea0e99dc59461fa334b18f3845e7c2c144f02761ca8ee49baf3a64672cc6f30a82e72b5e57a59ffcf9aa8b446ffb6b
@@ -8,9 +8,12 @@ module Fastlane
8
8
  hide_keys: [],
9
9
  title: "Codemagic options")
10
10
 
11
+ Fastlane::Helper::CodemagicHelper.validate!(params)
12
+
11
13
  json = get_post_payload(params[:app_id],
12
14
  params[:workflow_id],
13
15
  params[:branch],
16
+ params[:tag],
14
17
  params[:environment])
15
18
 
16
19
  params[:download] ||= {}
@@ -30,7 +33,7 @@ module Fastlane
30
33
  end
31
34
  end
32
35
 
33
- def self.get_post_payload(app_id, workflow_id, branch, environment)
36
+ def self.get_post_payload(app_id, workflow_id, branch, tag, environment)
34
37
  UI.message("Payload creation...")
35
38
  payload = {}
36
39
 
@@ -46,10 +49,15 @@ module Fastlane
46
49
  payload["branch"] = branch
47
50
  end
48
51
 
52
+ unless tag.nil?
53
+ payload["tag"] = tag
54
+ end
55
+
49
56
  unless environment.nil?
50
57
  payload["environment"] = environment
51
58
  end
52
59
 
60
+
53
61
  payload.to_json
54
62
  end
55
63
 
@@ -224,11 +232,14 @@ module Fastlane
224
232
  FastlaneCore::ConfigItem.new(key: :branch,
225
233
  env_name: "CODEMAGIC_BRANCH",
226
234
  description: "Codemagic branch name",
227
- optional: false,
228
- type: String,
229
- verify_block: proc do |value|
230
- UI.user_error!("No Codemagic branch given, pass it using `branch` parameter to the Codemagic plugin.") unless value && !value.empty?
231
- end),
235
+ optional: true,
236
+ type: String),
237
+
238
+ FastlaneCore::ConfigItem.new(key: :tag,
239
+ env_name: "CODEMAGIC_TAG",
240
+ description: "Codemagic tag",
241
+ optional: true,
242
+ type: String),
232
243
 
233
244
  FastlaneCore::ConfigItem.new(key: :download,
234
245
  description: "Download Codemagic artefacts",
@@ -11,6 +11,11 @@ module Fastlane
11
11
  def self.show_message
12
12
  UI.message("Hello from the codemagic plugin helper!")
13
13
  end
14
+ def self.validate!(params)
15
+ if (params[:branch].nil? || params[:branch].empty?) && (params[:tag].nil? || params[:tag].empty?)
16
+ UI.user_error!("You must provide either a branch or a tag.")
17
+ end
18
+ end
14
19
  end
15
20
  end
16
21
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Codemagic
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-codemagic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikhail Matsera
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-27 00:00:00.000000000 Z
11
+ date: 2025-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -136,7 +136,7 @@ dependencies:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: 2.154.0
139
- description:
139
+ description:
140
140
  email: mmatsera@gmail.com
141
141
  executables: []
142
142
  extensions: []
@@ -152,7 +152,7 @@ homepage: https://github.com/jetcore/fastlane-plugin-codemagic
152
152
  licenses:
153
153
  - MIT
154
154
  metadata: {}
155
- post_install_message:
155
+ post_install_message:
156
156
  rdoc_options: []
157
157
  require_paths:
158
158
  - lib
@@ -167,8 +167,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
167
167
  - !ruby/object:Gem::Version
168
168
  version: '0'
169
169
  requirements: []
170
- rubygems_version: 3.1.2
171
- signing_key:
170
+ rubygems_version: 3.4.22
171
+ signing_key:
172
172
  specification_version: 4
173
173
  summary: Fastlane plugin to trigger a Codemagic build with some options
174
174
  test_files: []