fastlane-plugin-bitrise 0.1.0 → 0.2.0

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
  SHA1:
3
- metadata.gz: 05dd7bdfddd3a2cbbabf155a18a970ea0803795b
4
- data.tar.gz: 3b0bbad433cd453fc385f4027e439fca328cdf17
3
+ metadata.gz: 576d78d122d5c065aa2a560ab4ea09ecfba2ec99
4
+ data.tar.gz: 5b2effca0db49a37585954c7a50dbf0bda2bd9eb
5
5
  SHA512:
6
- metadata.gz: a21c4c18b846ce7b0b097e6ca57ca73d1dbeae80f7cce740cdd46e01c2aba4365ba039fa7b00cb5c792c459aef81c51a034350396f4f0a861f3390dd8ab17df9
7
- data.tar.gz: 4e34c332ea4cf9f5dfc541fd3d8d1f46a486386fe1a49cd1f89e30029dc59b98964edcf5095c9b7488412c46772ef1faa8e108f2aa2c91cfebf24796877ac66c
6
+ metadata.gz: 5b2261c2fddb573bc3011c43473c0e9b8934764659aa404995165c38d4c3017a71ba7c7b31fd52b4800ad01fd40240a0ee7338109bc0f97a8dcc5c15f302a0d5
7
+ data.tar.gz: 9d3514c83fbc0dd4c42fb5378836d35aa1f825358586367464db23b8308f7b97dd7cabb7b8b09e06d10df3ce62937ed6b7e0c870ac9040b5bb06765068e74d74
data/README.md CHANGED
@@ -25,11 +25,12 @@ It can help you to automatically trigger a build after a bump commit for instanc
25
25
  | `app_slug` | Bitrise application slug, avalaible on bitrise.io > your app > code | String | **Mandatory** | `BITRISE_APP_SLUG` |
26
26
  | `trigger_token` | Bitrise build trigger token, avalaible on bitrise.io > your app > code | String | **Mandatory** | `BITRISE_TRIGGER_TOKEN` |
27
27
  | `workflow` | Bitrise workflow to trigger, if not specified, it'll trigger the default one | String | Optional | `BITRISE_WORKFLOW` |
28
+ | `author` | Desribe who triggered the build. It'll appear on the Bitrise.io build | String | Optional | `BITRISE_AUTHOR` |
28
29
  | `build_message` | Build message who'll appear on the Bitrise.io build | String | Optional | `BITRISE_BUILD_MESSAGE` |
29
30
  | `branch` | The git branch to build | String | Optional | `BITRISE_GIT_BRANCH` |
30
31
  | `commit` | The git commit hash to build | String | Optional | `BITRISE_GIT_COMMIT` |
31
32
  | `tag` | The git Tag to build | String | Optional | `BITRISE_GIT_TAG` |
32
- | `environments` | Bitrise environments to replace, it'll override the previous environment variables specified. The Hash key has to be the environment variable key (without the `$`), the Hash value has to be environment variable value | Hash | Optional | `BITRISE_ENVIRONMENTS` |
33
+ | `environments` | Bitrise environments to replace, it'll override the previous environment variables specified. The Hash key has to be the environment variable key (without the `$`), the Hash value has to be environment variable value | Hash | Optional | **none** |
33
34
 
34
35
  ## Return values
35
36
 
@@ -52,12 +53,13 @@ bitrise(
52
53
  )
53
54
  ```
54
55
 
55
- To trigger a build with a specific workflow, a specific git branch, display a build message and override some environments variables execute the following command:
56
+ To trigger a build with a specific workflow, a specific git branch, display a build message, the build author and override some environments variables execute the following command:
56
57
  ```
57
58
  bitrise(
58
59
  "app_slug": "YOUR_APP_SLUG",
59
60
  "trigger_token": "YOUR_TRIGGER_TOKEN",
60
61
  "workflow": "Beta",
62
+ "author": "Developer",
61
63
  "build_message": "Deploy build version 1.3.2 build number 11 to Beta test",
62
64
  "branch": "release/1.3.2",
63
65
  "environments": {
@@ -11,6 +11,7 @@ module Fastlane
11
11
 
12
12
  json = get_post_payload(params[:trigger_token],
13
13
  params[:workflow],
14
+ params[:author],
14
15
  params[:build_message],
15
16
  params[:branch],
16
17
  params[:commit],
@@ -25,6 +26,7 @@ module Fastlane
25
26
  # Parameters:
26
27
  # - trigger_token: Bitrise.io trigger token
27
28
  # - workflow: Bitrise.io workflow to trigger (optional)
29
+ # - author: Describe who triggered the build
28
30
  # - build_message: Build message on Bitrise.io (optional)
29
31
  # - branch: Git branch to trigger (optional)
30
32
  # - commit: Git commit to trigger (optional)
@@ -32,7 +34,7 @@ module Fastlane
32
34
  # - environments: Environments variables hash to replace (optional)
33
35
  #
34
36
  # Returns the JSON post payload
35
- def self.get_post_payload(trigger_token, workflow, build_message, branch, commit, tag, environments)
37
+ def self.get_post_payload(trigger_token, workflow, author, build_message, branch, commit, tag, environments)
36
38
  UI.message("Payload creation...")
37
39
  json_curl = {}
38
40
  payload = {}
@@ -42,6 +44,10 @@ module Fastlane
42
44
  hook_info["build_trigger_token"] = trigger_token
43
45
  payload["hook_info"] = hook_info
44
46
 
47
+ unless author.nil?
48
+ payload["triggered_by"] = author
49
+ end
50
+
45
51
  build_params = {}
46
52
  unless workflow.nil?
47
53
  build_params["workflow_id"] = workflow
@@ -181,8 +187,12 @@ module Fastlane
181
187
  description: "Build message who'll appear on Bitrise.io build",
182
188
  optional: true,
183
189
  type: String),
190
+ FastlaneCore::ConfigItem.new(key: :author,
191
+ env_name: "BITRISE_AUTHOR",
192
+ description: "Desribe who triggered the build it'll appear on Bitrise.io build",
193
+ optional: true,
194
+ type: String),
184
195
  FastlaneCore::ConfigItem.new(key: :environments,
185
- env_name: "BITRISE_ENVIRONMENTS",
186
196
  description: "Bitrise environments to replace, it'll override the previous environment variables specified. The Hash key has to be the environment variable key (without the $), the Hash value has to be environment variable value",
187
197
  optional: true,
188
198
  type: Hash,
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Bitrise
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-bitrise
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robin AUTHIAT
@@ -171,5 +171,5 @@ rubyforge_project:
171
171
  rubygems_version: 2.6.8
172
172
  signing_key:
173
173
  specification_version: 4
174
- summary: Trigger a bitrise build
174
+ summary: Fastlane plugin to trigger a bitrise build with some options
175
175
  test_files: []