fastlane-plugin-elux_actions 0.1.0 → 0.2.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: 1bc0c299758936bb24ca79af7311b7c86a6b0d89
|
4
|
+
data.tar.gz: e143dcdd2b379c1553e2a13af16e5680b22ee74e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e09095efc00febfbc4d248e6934238d196be92c3c3edf2e25bda93b5306ab47e9421db726d730834ca831ba028519b4bfa4b5e4ae2a396a898a161ff2b14c283
|
7
|
+
data.tar.gz: b449e04222eb6a24b7a0cae86e1444cbc14398b214e87f64a18db3a5f306e3d32a18ae311c3c283891a0b31f106d0ff8d20f8ca9f42ddbc6d1155a7f5591939b
|
@@ -1,43 +1,110 @@
|
|
1
1
|
module Fastlane
|
2
2
|
module Actions
|
3
|
+
module SharedValues
|
4
|
+
RELEASE_TO_NEXUS_CUSTOM_VALUE = :RELEASE_TO_NEXUS_CUSTOM_VALUE
|
5
|
+
end
|
6
|
+
|
3
7
|
class ReleaseToNexusAction < Action
|
4
8
|
def self.run(params)
|
5
|
-
|
6
|
-
end
|
9
|
+
# fastlane will take care of reading in the parameter and fetching the environment variable:
|
7
10
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
+
version = sh "echo `git describe --tags | sed s/v//g`"
|
12
|
+
version = version.rstrip
|
13
|
+
UI.message "Parameter API Token: #{version}"
|
14
|
+
UI.message "Parameter API Token: #{params[:artifact_id]}"
|
15
|
+
UI.message "Parameter API Token: #{params[:group_id]}"
|
11
16
|
|
12
|
-
|
13
|
-
|
17
|
+
path = params[:group_id].gsub(".", "/")
|
18
|
+
UI.message "Parameter API Token: #{path}"
|
19
|
+
sh "wget -P /tmp https://nexus.electrolux.io/repository/maven-candidates/#{path}/#{params[:artifact_id]}/#{version}/indoor-sdk-android-#{version}-release.aar"
|
20
|
+
|
21
|
+
sh "curl -v -u \"" + params[:nexus_user] + ":" + params[:nexus_password] + "\" --upload-file /tmp/#{params[:artifact_id]}-#{version}-release.aar https://nexus.electrolux.io/repository/maven-releases/#{path}/#{params[:artifact_id]}/#{version}/#{params[:artifact_id]}-#{version}-release.aar"
|
22
|
+
|
23
|
+
|
24
|
+
#sh "echo #{params[:test]}"
|
25
|
+
|
26
|
+
# Actions.lane_context[SharedValues::RELEASE_TO_NEXUS_CUSTOM_VALUE] = "my_val"
|
14
27
|
end
|
15
28
|
|
16
|
-
|
17
|
-
|
29
|
+
#####################################################
|
30
|
+
# @!group Documentation
|
31
|
+
#####################################################
|
32
|
+
|
33
|
+
def self.description
|
34
|
+
"A short description with <= 80 characters of what this action does"
|
18
35
|
end
|
19
36
|
|
20
37
|
def self.details
|
21
38
|
# Optional:
|
22
|
-
|
39
|
+
# this is your chance to provide a more detailed description of this action
|
40
|
+
"You can use this action to do cool things..."
|
23
41
|
end
|
24
42
|
|
25
43
|
def self.available_options
|
44
|
+
# Define all options your action supports.
|
45
|
+
|
46
|
+
# Below a few examples
|
26
47
|
[
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
48
|
+
FastlaneCore::ConfigItem.new(key: :artifact_id,
|
49
|
+
env_name: "artifact_id", # The name of the environment variable
|
50
|
+
description: "The artifact_id to use", # a short description of this parameter
|
51
|
+
verify_block: proc do |value|
|
52
|
+
UI.user_error!("Please provide artifact_id") unless (value and not value.empty?)
|
53
|
+
# UI.user_error!("Couldn't find file at path '#{value}'") unless File.exist?(value)
|
54
|
+
end),
|
55
|
+
FastlaneCore::ConfigItem.new(key: :group_id,
|
56
|
+
env_name: "group_id",
|
57
|
+
description: "The group_id to use",
|
58
|
+
verify_block: proc do |value|
|
59
|
+
UI.user_error!("Please provide group_id") unless (value and not value.empty?)
|
60
|
+
# UI.user_error!("Couldn't find file at path '#{value}'") unless File.exist?(value)
|
61
|
+
end),
|
62
|
+
FastlaneCore::ConfigItem.new(key: :nexus_user,
|
63
|
+
env_name: "nexus_user",
|
64
|
+
description: "The username in nexus",
|
65
|
+
verify_block: proc do |value|
|
66
|
+
UI.user_error!("Please provide group_id") unless (value and not value.empty?)
|
67
|
+
# UI.user_error!("Couldn't find file at path '#{value}'") unless File.exist?(value)
|
68
|
+
end),
|
69
|
+
FastlaneCore::ConfigItem.new(key: :nexus_password,
|
70
|
+
env_name: "nexus_password",
|
71
|
+
description: "The password in nexus",
|
72
|
+
verify_block: proc do |value|
|
73
|
+
UI.user_error!("Please provide group_id") unless (value and not value.empty?)
|
74
|
+
# UI.user_error!("Couldn't find file at path '#{value}'") unless File.exist?(value)
|
75
|
+
end)
|
76
|
+
|
32
77
|
]
|
33
78
|
end
|
34
79
|
|
80
|
+
def self.output
|
81
|
+
# Define the shared values you are going to provide
|
82
|
+
# Example
|
83
|
+
[
|
84
|
+
['RELEASE_TO_NEXUS_CUSTOM_VALUE', 'A description of what this value contains']
|
85
|
+
]
|
86
|
+
end
|
87
|
+
|
88
|
+
def self.return_value
|
89
|
+
# If you method provides a return value, you can describe here what it does
|
90
|
+
end
|
91
|
+
|
92
|
+
def self.authors
|
93
|
+
# So no one will ever forget your contribution to fastlane :) You are awesome btw!
|
94
|
+
["Your GitHub/Twitter Name"]
|
95
|
+
end
|
96
|
+
|
35
97
|
def self.is_supported?(platform)
|
36
|
-
#
|
37
|
-
#
|
98
|
+
# you can do things like
|
99
|
+
#
|
100
|
+
# true
|
38
101
|
#
|
39
|
-
#
|
40
|
-
|
102
|
+
# platform == :ios
|
103
|
+
#
|
104
|
+
# [:ios, :mac].include?(platform)
|
105
|
+
#
|
106
|
+
|
107
|
+
platform == :ios
|
41
108
|
end
|
42
109
|
end
|
43
110
|
end
|