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: 62bed1459f75f6f05fdde91a2059e8d831b881f6
4
- data.tar.gz: edcbbfa042090da316232f203de6b50491b0e7b3
3
+ metadata.gz: 1bc0c299758936bb24ca79af7311b7c86a6b0d89
4
+ data.tar.gz: e143dcdd2b379c1553e2a13af16e5680b22ee74e
5
5
  SHA512:
6
- metadata.gz: 0279f819da6f0e8167e6d70b642a7f9e3447bcfb901cf75aa012321b52b00f2983f5b26d82fcaaa898a59f56489a3de94dbe90198f2e7fb0dfe0fc5f1a970686
7
- data.tar.gz: 5c740e92f606e0fb316646f339983a1b6bfa7ed93afeccfe23fc5c38f67ddf639cb80c45d7f820f26bec220a236d8fc47e9ffc1361086126ab6938c7fe32e502
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
- UI.message("The release_to_nexus plugin is working!")
6
- end
9
+ # fastlane will take care of reading in the parameter and fetching the environment variable:
7
10
 
8
- def self.description
9
- "Plugin including actions for releasing the android SDK"
10
- end
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
- def self.authors
13
- ["Dennis Granath"]
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
- def self.return_value
17
- # If your method provides a return value, you can describe here what it does
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
- "Plugin including actions for releasing the android SDK"
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
- # FastlaneCore::ConfigItem.new(key: :your_option,
28
- # env_name: "ELUX_ACTIONS_YOUR_OPTION",
29
- # description: "A description of your option",
30
- # optional: false,
31
- # type: String)
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
- # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
37
- # See: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md
98
+ # you can do things like
99
+ #
100
+ # true
38
101
  #
39
- # [:ios, :mac, :android].include?(platform)
40
- true
102
+ # platform == :ios
103
+ #
104
+ # [:ios, :mac].include?(platform)
105
+ #
106
+
107
+ platform == :ios
41
108
  end
42
109
  end
43
110
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module EluxActions
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-elux_actions
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
  - Dennis Granath