fastlane-plugin-applivery 0.3.0 → 0.4.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4837b1b93fb42b422eff9e6e146da3e87fe2a194
|
4
|
+
data.tar.gz: 4913d85ab09471f18c3b9cf4565c4c99219437ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4a3d6f7dcbbbf9d676b03dc3f641f4838d5fa53a1e318b13bbf2842bf9de531d8f6ee354b12846bb566fe1eb8573606a324533d34e9c04fff66552854429556
|
7
|
+
data.tar.gz: c1b6cbf5fbaee8df966811ea1c023173b52c7adad751cd6b90af5fa20f828108e26f32782456a18032704d12ba2c0ffe371ccef34157a73dd6afa54f9846fee4
|
@@ -1,6 +1,7 @@
|
|
1
1
|
module Fastlane
|
2
2
|
module Actions
|
3
3
|
class AppliveryAction < Action
|
4
|
+
|
4
5
|
def self.run(params)
|
5
6
|
app_id = params[:app_id]
|
6
7
|
api_key = params[:api_key]
|
@@ -9,16 +10,7 @@ module Fastlane
|
|
9
10
|
tags = params[:tags]
|
10
11
|
build_path = params[:build_path]
|
11
12
|
notify = params[:notify]
|
12
|
-
|
13
|
-
platform = Actions.lane_context[Actions::SharedValues::PLATFORM_NAME]
|
14
|
-
|
15
|
-
if platform == :ios or platform.nil?
|
16
|
-
os = "ios"
|
17
|
-
end
|
18
|
-
|
19
|
-
if platform == :android
|
20
|
-
os = "android"
|
21
|
-
end
|
13
|
+
os = Helper::AppliveryHelper.platform
|
22
14
|
|
23
15
|
command = "curl \"https://dashboard.applivery.com/api/builds\""
|
24
16
|
command += " -H \"Authorization: #{api_key}\""
|
@@ -28,7 +20,10 @@ module Fastlane
|
|
28
20
|
command += " -F notify=#{notify}"
|
29
21
|
command += " -F os=#{os}"
|
30
22
|
command += " -F tags=\"#{tags}\""
|
23
|
+
command += " -F deployer=fastlane"
|
31
24
|
command += " -F package=@\"#{build_path}\""
|
25
|
+
command += Helper::AppliveryHelper.add_integration_number
|
26
|
+
command += Helper::AppliveryHelper.add_git_params
|
32
27
|
|
33
28
|
Actions.sh(command)
|
34
29
|
end
|
@@ -7,6 +7,55 @@ module Fastlane
|
|
7
7
|
def self.show_message
|
8
8
|
UI.message("Hello from the applivery plugin helper!")
|
9
9
|
end
|
10
|
+
|
11
|
+
def self.platform
|
12
|
+
platform = Actions.lane_context[Actions::SharedValues::PLATFORM_NAME]
|
13
|
+
if platform == :ios or platform.nil?
|
14
|
+
return "ios"
|
15
|
+
elsif platform == :android
|
16
|
+
return "android"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.is_git?
|
21
|
+
Actions.sh('git rev-parse HEAD')
|
22
|
+
return true
|
23
|
+
rescue
|
24
|
+
return false
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.add_git_params
|
28
|
+
command = ""
|
29
|
+
if self.is_git?
|
30
|
+
UI.message "Detected repo: git"
|
31
|
+
gitBranch = Actions.git_branch
|
32
|
+
gitCommit = Actions.sh('git rev-parse --short HEAD')
|
33
|
+
gitMessage = Actions.last_git_commit_message
|
34
|
+
gitRepositoryURL = Actions.sh('git config --get remote.origin.url')
|
35
|
+
gitTag = Actions.sh('git describe --abbrev=0 --tags')
|
36
|
+
gitTagCommit = Actions.sh("git rev-list -n 1 --abbrev-commit #{gitTag}")
|
37
|
+
|
38
|
+
command += " -F gitBranch=\"#{gitBranch}\""
|
39
|
+
command += " -F gitCommit=\"#{gitCommit}\""
|
40
|
+
command += " -F gitMessage=\"#{gitMessage}\""
|
41
|
+
command += " -F gitRepositoryURL=\"#{gitRepositoryURL}\""
|
42
|
+
if gitTagCommit == gitCommit
|
43
|
+
command += " -F gitTag=\"#{gitTag}\""
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
return command
|
48
|
+
end
|
49
|
+
|
50
|
+
def self.add_integration_number
|
51
|
+
integrationNumber = ENV["XCS_INTEGRATION_NUMBER"] # XCode Server
|
52
|
+
command = ""
|
53
|
+
if !integrationNumber.nil?
|
54
|
+
command += " -F buildNumber=\"#{integrationNumber}\""
|
55
|
+
end
|
56
|
+
return command
|
57
|
+
end
|
58
|
+
|
10
59
|
end
|
11
60
|
end
|
12
61
|
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: 0.
|
4
|
+
version: 0.4.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: 2016-
|
11
|
+
date: 2016-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|