fastlane-plugin-elux_actions 1.1.0 → 1.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: 91f5b5a0171a995e3b1170d704426cf834a83fd7
4
- data.tar.gz: 7844ff12283507712ab47308a65e75f8abb4053e
3
+ metadata.gz: 0ff862c1880c1eb68841fedba8ddffa82711818c
4
+ data.tar.gz: 667acf2a164b0db917c764847eed594334fc39a3
5
5
  SHA512:
6
- metadata.gz: 731241fc5f21b562b6acebccc9985927969c3e9c7704c79d7b653b3b4806e850717ef40d3faf6ac57dfe50d28a4d23b074d64ce645af4889371d30de10400e56
7
- data.tar.gz: 83f0d1f30c8955ecf92e7fe918ab64d655ce762374972cd1350324caebe019805077aed00a00c4206b450582762c0bb6b6157ff8c939bf666f9cbc8de4ff41bd
6
+ metadata.gz: b71c6146674c5c96900add7b3e5c4ebac5ac8870d86cdbd6aa87ddbb8a32b5a4d3c6ef81caccb749bdbc12d1d958486c3a7c5dede8e9f448e6c98f2dd32f5e03
7
+ data.tar.gz: ebe3e4292748d3f9e7885f0c168d245ad9944c625120c5867af963a48b4be5191965814bdb851979be8d3ddf9e537b033d72fa19a725ad1fca1eed8b5985b869
@@ -0,0 +1,87 @@
1
+ module Fastlane
2
+ module Actions
3
+ module SharedValues
4
+ NEW_VERSION = :NEW_VERSION
5
+ NEW_VERSION_NUMBERS = :NEW_VERSION_NUMBERS
6
+ end
7
+
8
+ class IncrementVersionAndTagAction < Action
9
+ def self.run(params)
10
+ # Get next version number
11
+ cmd = "git tag --sort=v:refname --contains HEAD | grep \"#{params[:version_pattern]}\" | tail -1 | awk -F. '{printf(\"%s.%s.0\", $1, $2+1)}'"
12
+ STDOUT.puts cmd
13
+ STDOUT.flush
14
+ version = `#{cmd}`
15
+ Actions.lane_context[SharedValues::NEW_VERSION] = version
16
+ Actions.lane_context[SharedValues::NEW_VERSION_NUMBERS] = version.gsub(/[a-zA-Z]/, '')
17
+ version
18
+
19
+ # Create the tag
20
+ cmd = "git tag -a \"#{version}\" -m \"Version #{version}\""
21
+ STDOUT.puts cmd
22
+ STDOUT.flush
23
+ status = sh cmd
24
+
25
+ end
26
+
27
+ #####################################################
28
+ # @!group Documentation
29
+ #####################################################
30
+
31
+ def self.description
32
+ "Increment the version by looking for latest version tag"
33
+ end
34
+
35
+ def self.details
36
+ # Optional:
37
+ # this is your chance to provide a more detailed description of this action
38
+ "The details here"
39
+ end
40
+
41
+ def self.available_options
42
+ # Define all options your action supports.
43
+
44
+ # Below a few examples
45
+ [
46
+ FastlaneCore::ConfigItem.new(key: :version_pattern,
47
+ env_name: "version_pattern", # The name of the repository
48
+ description: "The version pattern (regexp)", # a short description of this parameter
49
+ default_value: "v[0-9]*\.[0-9]*\.[0-9]*",
50
+ optional: true)
51
+
52
+ ]
53
+ end
54
+
55
+ def self.output
56
+ # Define the shared values you are going to provide
57
+ # Example
58
+ [
59
+ ['NEW_VERSION', 'The new version'],
60
+ ['NEW_VERSION_NUMBERS', 'The new version, only numbers and periods']
61
+ ]
62
+ end
63
+
64
+ def self.return_value
65
+ # If you method provides a return value, you can describe here what it does
66
+ end
67
+
68
+ def self.authors
69
+ # So no one will ever forget your contribution to fastlane :) You are awesome btw!
70
+ ["Your GitHub/Twitter Name"]
71
+ end
72
+
73
+ def self.is_supported?(platform)
74
+ # you can do things like
75
+ #
76
+ # true
77
+ #
78
+ # platform == :ios
79
+ #
80
+ # [:ios, :mac].include?(platform)
81
+ #
82
+
83
+ platform == :ios
84
+ end
85
+ end
86
+ end
87
+ end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module EluxActions
3
- VERSION = "1.1.0"
3
+ VERSION = "1.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-elux_actions
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dennis Granath
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-19 00:00:00.000000000 Z
11
+ date: 2017-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -103,6 +103,7 @@ files:
103
103
  - LICENSE
104
104
  - README.md
105
105
  - lib/fastlane/plugin/elux_actions.rb
106
+ - lib/fastlane/plugin/elux_actions/actions/increment_version_and_tag.rb
106
107
  - lib/fastlane/plugin/elux_actions/actions/nexus_promote_action.rb
107
108
  - lib/fastlane/plugin/elux_actions/actions/upload_to_nexus_3.rb
108
109
  - lib/fastlane/plugin/elux_actions/helper/elux_actions_helper.rb