fastlane-plugin-applivery 1.1.2 → 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
  SHA1:
3
- metadata.gz: fa0857b146524c713bbcaf464913b871e1ede809
4
- data.tar.gz: a7f350b0f2732440543ab6b4895b0a041ceb317e
3
+ metadata.gz: c7f94a50ce21432b54c1100817072d934bbc53f2
4
+ data.tar.gz: 801b81a79fc877bf8d2186d0c4cc501cd904ee46
5
5
  SHA512:
6
- metadata.gz: c396fc5f5a9af536017c87c46f85f2e16534c458f74a1686c2ae9e7688a82aa95ebd42a9fd19f9ebfc50de5d71216dacb9d21839dc84b5488d4dea37a108773a
7
- data.tar.gz: 43153a22dfdd9bc47823de29a6329b3d71bf4c289a0435c2335cff7d09e8a84fe4b43d5de333e065afd6e54514cdc1efa2193235f4edd9dbd99fdc5f49d48b51
6
+ metadata.gz: fbfd2f77db4858ec13e7630acf12ae3d55c546935e071abc9dbeae6e7431431898837c849e19e0f9028e87952b7399730f23df27b08e53338fe1d34e9273df80
7
+ data.tar.gz: 775b30f9d0fdc5915ab14cf3ec4f0e1a28bcc4207505d283575d6b7a4146781f449f4c3894f317afe28ce381f1ccc85b36ea59006eafde7655b0a74c631192cc
data/README.md CHANGED
@@ -30,43 +30,45 @@ Below you'll find some basic examples about how to **build** a new iOS or Androi
30
30
 
31
31
  ### iOS App build and deploy
32
32
  Next you'll find a `lane` with two steps: `gym()` that will build the iOS App and `applivery()` that will take care about the deployment.
33
+
33
34
  ```ruby
34
35
  lane :applivery_ios do
35
36
  gym(
36
37
  scheme: "YOUR_APP_SCHEME", # Your App Scheme
37
38
  export_method: 'enterprise') # Choose between: enterprise or ad-hoc
38
39
  applivery(
39
- app_id: "YOUR_APP_ID", # Your Applivery App Id
40
- api_key: "YOUR_API_KEY" # Your Applivery API Key
40
+ app_token: "YOUR_APP_TOKEN" # Your Applivery App Token
41
41
  )
42
42
  end
43
43
  ```
44
+
44
45
  ### Android App build and deploy
45
46
  Next you'll find a `lane` with two steps: `gradle()` that will build the Android App and `applivery()` that will take care about the deployment.
47
+
46
48
  ```ruby
47
49
  lane :applivery_android do
48
50
  gradle(task: "assembleRelease")
49
51
  applivery(
50
- app_id: "YOUR_APP_ID", # Your Applivery App Id
51
- api_key: "YOUR_API_KEY" # Your Applivery API Key
52
+ appToken: "YOUR_APP_TOKEN" # Your Applivery App Token
52
53
  )
53
54
  end
54
55
  ```
56
+
55
57
  Please check out the [example `Fastfile`](fastlane/Fastfile) to see additional examples of how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
56
58
 
57
59
  ## Additional Parameters
58
- The above examples are the most simple configuration you can have but in addition to the `app_id` and `api_key` parameters, you can add additional ones to fully customize the deployment process. They are:
59
-
60
- | Param | Description | Mandatory | Values |
61
- |-------------|-----------------------------|-----------|--------------|
62
- | `app_id` | Applivery App ID | YES | string -> Available in the App details |
63
- | `api_key` | Applivery API Key | YES | string -> Available the [Developers](https://dashboard.applivery.com/dashboard/developers) area |
64
- | `name` | Applivery Build name | NO | string. i.e.: "RC 1.0" |
65
- | `notify` | Notify users after deploy | NO | true / false |
66
- | `notes` | Release notes | NO | string. i.e.: "Bug fixing" |
67
- | `tags` | Tags to identify the build | NO | string comma separated. i.e.: "RC1, QA" |
68
- | `autoremove`| Remove the last build | NO | true / false |
69
- | `build_path`| Build path to the APK / IPA file | NO | string, by default it takes the IPA/APK build path |
60
+ The above examples are the most simple configuration you can have but you can add additional parameters to fully customize the deployment process. They are:
61
+
62
+ | Param | Description | Mandatory | Values |
63
+ |--------------------------|--------------------------------------|-----------|--------------|
64
+ | `app_token` | Applivery App Token | YES | string -> Available in the App Settings |
65
+ | `name` | Applivery Build name | NO | string-> i.e.: "RC 1.0" |
66
+ | `notify_collaborators` | Notify Collaborators after deploy | NO | booletan -> i.e.: rue / false |
67
+ | `notify_employees` | Notify Employees after deploy | NO | booletan -> i.e.: true / false |
68
+ | `notify_message` | Notification message | NO | string -> i.e.: "Enjoy the new version!" |
69
+ | `changelog` | Release notes | NO | string -> i.e.: "Bug fixing" |
70
+ | `tags` | Tags to identify the build | NO | string -> comma separated. i.e.: "RC1, QA" |
71
+ | `build_path` | Build path to the APK / IPA file | NO | string -> by default it takes the IPA/APK build path |
70
72
 
71
73
  ## Run tests for this plugin
72
74
 
@@ -3,27 +3,25 @@ module Fastlane
3
3
  class AppliveryAction < Action
4
4
 
5
5
  def self.run(params)
6
- app_id = params[:app_id]
7
- api_key = params[:api_key]
6
+ app_token = params[:app_token]
8
7
  name = params[:name]
9
- notes = Helper::AppliveryHelper.escape(params[:notes])
8
+ changelog = Helper::AppliveryHelper.escape(params[:changelog])
9
+ notify_message = Helper::AppliveryHelper.escape(params[:notify_message])
10
10
  tags = params[:tags]
11
11
  build_path = params[:build_path]
12
- notify = params[:notify]
13
- autoremove = params[:autoremove]
14
- os = Helper::AppliveryHelper.platform
12
+ notify_collaborators = params[:notify_collaborators]
13
+ notify_employees = params[:notify_employees]
15
14
 
16
- command = "curl \"https://dashboard.applivery.com/api/builds\""
17
- command += " -H \"Authorization: #{api_key}\""
18
- command += " -F app=\"#{app_id}\""
15
+ command = "curl \"https://api.applivery.io/v1/integrations/builds\""
16
+ command += " -H \"Authorization: bearer #{app_token}\""
19
17
  command += " -F versionName=\"#{name}\""
20
- command += " -F notes=\"#{notes}\""
21
- command += " -F notify=#{notify}"
22
- command += " -F autoremove=#{autoremove}"
23
- command += " -F os=#{os}"
18
+ command += " -F changelog=\"#{changelog}\""
19
+ command += " -F notifyCollaborators=#{notify_collaborators}"
20
+ command += " -F notifyEmployees=#{notify_employees}"
24
21
  command += " -F tags=\"#{tags}\""
25
- command += " -F deployer=fastlane"
26
- command += " -F package=@\"#{build_path}\""
22
+ command += " -F notifyMessage=\"#{notify_message}\""
23
+ command += " -F build=@\"#{build_path}\""
24
+ command += " -F deployer.name=fastlane"
27
25
  command += Helper::AppliveryHelper.add_integration_number
28
26
  command += Helper::AppliveryHelper.add_git_params
29
27
 
@@ -41,35 +39,29 @@ module Fastlane
41
39
  end
42
40
 
43
41
  def self.description
44
- "Upload new build to Applivery"
42
+ "Upload new iOS or Android build to Applivery"
45
43
  end
46
44
 
47
45
  def self.authors
48
- ["Alejandro Jimenez"]
46
+ ["Alejandro Jimenez", "Cesar Trigo"]
49
47
  end
50
48
 
51
49
  def self.available_options
52
50
  [
53
- FastlaneCore::ConfigItem.new(key: :app_id,
54
- env_name: "APPLIVERY_APP_ID",
51
+ FastlaneCore::ConfigItem.new(key: :app_token,
52
+ env_name: "APPLIVERY_APP_TOKEN",
55
53
  description: "Your application identifier",
56
54
  optional: false,
57
55
  type: String),
58
56
 
59
- FastlaneCore::ConfigItem.new(key: :api_key,
60
- env_name: "APPLIVERY_API_KEY",
61
- description: "Your developer key",
62
- optional: false,
63
- type: String),
64
-
65
57
  FastlaneCore::ConfigItem.new(key: :name,
66
58
  env_name: "APPLIVERY_BUILD_NAME",
67
59
  description: "Your build name",
68
60
  optional: true,
69
61
  type: String),
70
62
 
71
- FastlaneCore::ConfigItem.new(key: :notes,
72
- env_name: "APPLIVERY_BUILD_NOTES",
63
+ FastlaneCore::ConfigItem.new(key: :changelog,
64
+ env_name: "APPLIVERY_BUILD_CHANGELOG",
73
65
  description: "Your build notes",
74
66
  default_value: "Uploaded automatically with fastlane plugin",
75
67
  optional: true,
@@ -88,19 +80,27 @@ module Fastlane
88
80
  optional: true,
89
81
  type: String),
90
82
 
91
- FastlaneCore::ConfigItem.new(key: :notify,
92
- env_name: "APPLIVERY_NOTIFY",
93
- description: "Send an email to your users",
83
+ FastlaneCore::ConfigItem.new(key: :notify_collaborators,
84
+ env_name: "APPLIVERY_NOTIFY_COLLABORATORS",
85
+ description: "Send an email to your App Collaborators",
94
86
  default_value: true,
95
87
  optional: true,
96
88
  is_string: false),
97
89
 
98
- FastlaneCore::ConfigItem.new(key: :autoremove,
99
- env_name: "APPLIVERY_AUTOREMOVE",
100
- description: "Automatically remove your application's oldest build",
90
+ FastlaneCore::ConfigItem.new(key: :notify_employees,
91
+ env_name: "APPLIVERY_NOTIFY_EMPLOYEES",
92
+ description: "Send an email to your App Employees",
101
93
  default_value: true,
102
94
  optional: true,
103
- is_string: false)
95
+ is_string: false),
96
+
97
+ FastlaneCore::ConfigItem.new(key: :notify_message,
98
+ env_name: "APPLIVERY_NOTIFY_MESSAGE",
99
+ description: "Notification message to be sent along with email notifications",
100
+ default_value: "New version uploaded!",
101
+ optional: true,
102
+ type: String),
103
+
104
104
  ]
105
105
  end
106
106
 
@@ -119,8 +119,7 @@ module Fastlane
119
119
  def self.example_code
120
120
  [
121
121
  'applivery(
122
- app_id: "YOUR_APP_ID",
123
- api_key: "YOUR_APP_SECRET")'
122
+ app_token: "YOUR_APP_TOKEN")'
124
123
  ]
125
124
  end
126
125
 
@@ -28,11 +28,11 @@ module Fastlane
28
28
  command = ""
29
29
 
30
30
  if !xcodeIntegrationNumber.nil?
31
- command += " -F buildNumber=\"#{xcodeIntegrationNumber}\""
31
+ command += " -F deployer.info.buildNumber=\"#{xcodeIntegrationNumber}\""
32
32
  elsif !jenkinsIntegrationNumber.nil?
33
- command += " -F buildNumber=\"#{jenkinsIntegrationNumber}\""
33
+ command += " -F deployer.info.buildNumber=\"#{jenkinsIntegrationNumber}\""
34
34
  elsif !travisIntegrationNumber.nil?
35
- command += " -F buildNumber=\"#{travisIntegrationNumber}\""
35
+ command += " -F deployer.info.buildNumber=\"#{travisIntegrationNumber}\""
36
36
  end
37
37
 
38
38
  return command
@@ -56,9 +56,9 @@ module Fastlane
56
56
  gitCommit = Actions.sh('git rev-parse --short HEAD')
57
57
  gitMessage = Actions.last_git_commit_message
58
58
 
59
- command += " -F gitBranch=\"#{gitBranch}\""
60
- command += " -F gitCommit=\"#{gitCommit}\""
61
- command += " -F gitMessage=\"#{self.escape(gitMessage)}\""
59
+ command += " -F deployer.info.branch=\"#{gitBranch}\""
60
+ command += " -F deployer.info.commit=\"#{gitCommit}\""
61
+ command += " -F deployer.info.commitMessage=\"#{self.escape(gitMessage)}\""
62
62
  command += self.add_git_remote
63
63
  command += self.add_git_tag
64
64
  end
@@ -70,7 +70,7 @@ module Fastlane
70
70
  gitTagCommit = Actions.sh("git rev-list -n 1 --abbrev-commit #{gitTag}")
71
71
  gitCommit = Actions.sh('git rev-parse --short HEAD')
72
72
  if gitTagCommit == gitCommit
73
- return " -F gitTag=\"#{gitTag}\""
73
+ return " -F deployer.info.tag=\"#{gitTag}\""
74
74
  end
75
75
  return ""
76
76
  rescue
@@ -79,7 +79,7 @@ module Fastlane
79
79
 
80
80
  def self.add_git_remote
81
81
  gitRepositoryURL = Actions.sh('git config --get remote.origin.url')
82
- return " -F gitRepositoryURL=\"#{gitRepositoryURL}\""
82
+ return " -F deployer.info.repositoryUrl=\"#{gitRepositoryURL}\""
83
83
  rescue
84
84
  return ""
85
85
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Applivery
3
- VERSION = "1.1.2"
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-applivery
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alejandro Jimenez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-05 00:00:00.000000000 Z
11
+ date: 2019-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry