fastlane-plugin-generic_version 0.1.0 → 0.2.5

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
  SHA256:
3
- metadata.gz: ee921cc9c81bf5301caa413e13db260e1544456dafa1415e1dac6d4d727d911f
4
- data.tar.gz: e74ee2fe21e39f0d791f06762c689cc8caf2da3b7aad25aefcaf2bf133a4f953
3
+ metadata.gz: db99e8b9f5fd9fc72f88d460fbace7f79a8d8c6ced9a7baf346a05b45b96aeb6
4
+ data.tar.gz: a353cd400559a435d67addc1792b385410fc89f496c31d40cc8365d7ff98ff3c
5
5
  SHA512:
6
- metadata.gz: c990246f983be4e4233014668107a43508dda88e4da464932c14ac0b11ce078ba1089912b8d88d41a116c3bd8f194fbffd6804d3e1b7b5e3b2e0db7d60d3291b
7
- data.tar.gz: f23ae61789f3e65593fde6b2b41eb69da1c292731143217b7447d691ae2f0c2bf4bddcd041e0cd822892712b12fdbaeef66ff76975006a9c16d9892b66587dc4
6
+ metadata.gz: '08de9c8c1fd22c46525dc5dde7a03c69fe4b84990ef303fcc5067077acfb2fdf80942bf41211bbaa488a4674ca405d88c900e4bb5d2ba912a81f842e16656067'
7
+ data.tar.gz: 1c04f85d76053784772377c811ef232da0deeca33de00318944a685332ac42e0c7621e824153b19ccdefc801f6d000310c102e565b1b2c91fef26ea7cd5a2710
data/README.md CHANGED
@@ -35,6 +35,13 @@ To automatically fix many of the styling issues, use
35
35
  rubocop -a
36
36
  ```
37
37
 
38
+ To install and/or release
39
+ ```
40
+ bundle install
41
+ rake install
42
+ rake release
43
+ ```
44
+
38
45
  ## Issues and Feedback
39
46
 
40
47
  For any other issues and feedback about this plugin, please submit it to this repository.
@@ -1,5 +1,4 @@
1
1
  require 'fastlane/action'
2
- require 'fastlane/action'
3
2
  require_relative '../helper/generic_version_helper'
4
3
 
5
4
  module Fastlane
@@ -11,15 +10,19 @@ module Fastlane
11
10
 
12
11
  new_version = other_action.set_app_version(
13
12
  version: version,
13
+ target: params[:target],
14
+ scheme: params[:scheme]
14
15
  )
15
16
 
16
17
  new_build = other_action.set_app_build(
17
- build: build
18
+ build: build,
19
+ target: params[:target],
20
+ scheme: params[:scheme]
18
21
  )
19
22
 
20
- UI.important "New version is:"
21
- UI.message " Version: #{new_version}"
22
- UI.message " Build: #{new_build}"
23
+ UI.important("New version is:")
24
+ UI.message(" Version: #{new_version}")
25
+ UI.message(" Build: #{new_build}")
23
26
 
24
27
  version
25
28
  end
@@ -51,7 +54,17 @@ module Fastlane
51
54
  env_name: "GENERIC_VERSION_SET_APP_BUILD",
52
55
  description: "App build",
53
56
  optional: true,
54
- type: String)
57
+ type: String),
58
+ FastlaneCore::ConfigItem.new(key: :target,
59
+ env_name: "GENERIC_VERSION_APP_TARGET",
60
+ optional: true,
61
+ conflicting_options: [:scheme],
62
+ description: "Specify a specific target if you have multiple per project, optional"),
63
+ FastlaneCore::ConfigItem.new(key: :scheme,
64
+ env_name: "GENERIC_VERSION_APP_SCHEME",
65
+ optional: true,
66
+ conflicting_options: [:target],
67
+ description: "Specify a specific scheme if you have multiple per project, optional")
55
68
  ]
56
69
  end
57
70
 
@@ -1,5 +1,4 @@
1
1
  require 'fastlane/action'
2
- require 'fastlane/action'
3
2
  require_relative '../helper/generic_version_helper'
4
3
 
5
4
  module Fastlane
@@ -11,12 +10,17 @@ module Fastlane
11
10
 
12
11
  if platform == :android
13
12
  # android
14
- Helper::GenericVersionHelper.load_dependencies
13
+ Helper::GenericVersionHelper.load_dependencies('fastlane-plugin-versioning_android')
15
14
 
16
15
  build = other_action.android_get_version_code
17
- else
16
+ else
18
17
  # ios or osx
19
- build = other_action.get_build_number
18
+ Helper::GenericVersionHelper.load_dependencies('fastlane-plugin-versioning')
19
+
20
+ build = other_action.get_build_number_from_xcodeproj(
21
+ target: params[:target],
22
+ scheme: params[:scheme]
23
+ )
20
24
  end
21
25
 
22
26
  build
@@ -39,7 +43,18 @@ module Fastlane
39
43
  end
40
44
 
41
45
  def self.available_options
42
- []
46
+ [
47
+ FastlaneCore::ConfigItem.new(key: :target,
48
+ env_name: "GENERIC_VERSION_APP_TARGET",
49
+ optional: true,
50
+ conflicting_options: [:scheme],
51
+ description: "Specify a specific target if you have multiple per project, optional"),
52
+ FastlaneCore::ConfigItem.new(key: :scheme,
53
+ env_name: "GENERIC_VERSION_APP_SCHEME",
54
+ optional: true,
55
+ conflicting_options: [:target],
56
+ description: "Specify a specific scheme if you have multiple per project, optional")
57
+ ]
43
58
  end
44
59
 
45
60
  def self.is_supported?(platform)
@@ -1,5 +1,4 @@
1
1
  require 'fastlane/action'
2
- require 'fastlane/action'
3
2
  require_relative '../helper/generic_version_helper'
4
3
 
5
4
  module Fastlane
@@ -11,12 +10,17 @@ module Fastlane
11
10
 
12
11
  if platform == :android
13
12
  # android
14
- Helper::GenericVersionHelper.load_dependencies
13
+ Helper::GenericVersionHelper.load_dependencies('fastlane-plugin-versioning_android')
15
14
 
16
15
  version = other_action.android_get_version_name
17
- else
16
+ else
18
17
  # ios or osx
19
- version = other_action.get_version_number
18
+ Helper::GenericVersionHelper.load_dependencies('fastlane-plugin-versioning')
19
+
20
+ version = other_action.get_version_number_from_xcodeproj(
21
+ target: params[:target],
22
+ scheme: params[:scheme]
23
+ )
20
24
  end
21
25
 
22
26
  version
@@ -31,7 +35,7 @@ module Fastlane
31
35
  end
32
36
 
33
37
  def self.return_value
34
- "The current app version"
38
+ "The current app version"
35
39
  end
36
40
 
37
41
  def self.details
@@ -39,7 +43,18 @@ module Fastlane
39
43
  end
40
44
 
41
45
  def self.available_options
42
- []
46
+ [
47
+ FastlaneCore::ConfigItem.new(key: :target,
48
+ env_name: "GENERIC_VERSION_APP_TARGET",
49
+ optional: true,
50
+ conflicting_options: [:scheme],
51
+ description: "Specify a specific target if you have multiple per project, optional"),
52
+ FastlaneCore::ConfigItem.new(key: :scheme,
53
+ env_name: "GENERIC_VERSION_APP_SCHEME",
54
+ optional: true,
55
+ conflicting_options: [:target],
56
+ description: "Specify a specific scheme if you have multiple per project, optional")
57
+ ]
43
58
  end
44
59
 
45
60
  def self.is_supported?(platform)
@@ -1,5 +1,4 @@
1
1
  require 'fastlane/action'
2
- require 'fastlane/action'
3
2
  require_relative '../helper/generic_version_helper'
4
3
 
5
4
  module Fastlane
@@ -16,15 +15,19 @@ module Fastlane
16
15
 
17
16
  if platform == :android
18
17
  # android
19
- Helper::GenericVersionHelper.load_dependencies
18
+ Helper::GenericVersionHelper.load_dependencies('fastlane-plugin-versioning_android')
20
19
 
21
20
  build = other_action.android_set_version_code(
22
- version_code: build,
21
+ version_code: build
23
22
  )
24
- else
23
+ else
25
24
  # ios or osx
26
- build = other_action.increment_build_number(
25
+ Helper::GenericVersionHelper.load_dependencies('fastlane-plugin-versioning')
26
+
27
+ build = other_action.increment_build_number_in_xcodeproj(
27
28
  build_number: build,
29
+ target: params[:target],
30
+ scheme: params[:scheme]
28
31
  )
29
32
  end
30
33
 
@@ -50,10 +53,20 @@ module Fastlane
50
53
  def self.available_options
51
54
  [
52
55
  FastlaneCore::ConfigItem.new(key: :build,
53
- env_name: "APP_BUILD",
56
+ env_name: "GENERIC_VERSION_SET_APP_BUILD",
54
57
  description: "Build",
55
58
  optional: true,
56
- type: String)
59
+ type: String),
60
+ FastlaneCore::ConfigItem.new(key: :target,
61
+ env_name: "GENERIC_VERSION_APP_TARGET",
62
+ optional: true,
63
+ conflicting_options: [:scheme],
64
+ description: "Specify a specific target if you have multiple per project, optional"),
65
+ FastlaneCore::ConfigItem.new(key: :scheme,
66
+ env_name: "GENERIC_VERSION_APP_SCHEME",
67
+ optional: true,
68
+ conflicting_options: [:target],
69
+ description: "Specify a specific scheme if you have multiple per project, optional")
57
70
  ]
58
71
  end
59
72
 
@@ -1,5 +1,4 @@
1
1
  require 'fastlane/action'
2
- require 'fastlane/action'
3
2
  require_relative '../helper/generic_version_helper'
4
3
 
5
4
  module Fastlane
@@ -13,21 +12,28 @@ module Fastlane
13
12
  UI.important("No specific version was given. The current version will be incremented.")
14
13
 
15
14
  # increment current version number
16
- current_version = Helper::GenericVersionHelper.sanitize_version(other_action.get_app_version)
15
+ current_version = Helper::GenericVersionHelper.sanitize_version(other_action.get_app_version(
16
+ target: params[:target],
17
+ scheme: params[:scheme]
18
+ ))
17
19
  version = Helper::GenericVersionHelper.bump_version(current_version)
18
20
  end
19
21
 
20
22
  if platform == :android
21
23
  # android
22
- Helper::GenericVersionHelper.load_dependencies
24
+ Helper::GenericVersionHelper.load_dependencies('fastlane-plugin-versioning_android')
23
25
 
24
26
  version = other_action.android_set_version_name(
25
- version_name: version,
27
+ version_name: version
26
28
  )
27
- else
29
+ else
28
30
  # ios or osx
29
- version = other_action.increment_version_number(
31
+ Helper::GenericVersionHelper.load_dependencies('fastlane-plugin-versioning')
32
+
33
+ version = other_action.increment_version_number_in_xcodeproj(
30
34
  version_number: version,
35
+ target: params[:target],
36
+ scheme: params[:scheme]
31
37
  )
32
38
  end
33
39
 
@@ -43,7 +49,7 @@ module Fastlane
43
49
  end
44
50
 
45
51
  def self.return_value
46
- "The new app version"
52
+ "The new app version"
47
53
  end
48
54
 
49
55
  def self.details
@@ -53,10 +59,20 @@ module Fastlane
53
59
  def self.available_options
54
60
  [
55
61
  FastlaneCore::ConfigItem.new(key: :version,
56
- env_name: "APP_VERSION",
62
+ env_name: "GENERIC_VERSION_SET_APP_VERSION",
57
63
  description: "Version",
58
64
  optional: true,
59
65
  type: String),
66
+ FastlaneCore::ConfigItem.new(key: :target,
67
+ env_name: "GENERIC_VERSION_APP_TARGET",
68
+ optional: true,
69
+ conflicting_options: [:scheme],
70
+ description: "Specify a specific target if you have multiple per project, optional"),
71
+ FastlaneCore::ConfigItem.new(key: :scheme,
72
+ env_name: "GENERIC_VERSION_APP_SCHEME",
73
+ optional: true,
74
+ conflicting_options: [:target],
75
+ description: "Specify a specific scheme if you have multiple per project, optional")
60
76
  ]
61
77
  end
62
78
 
@@ -1,7 +1,7 @@
1
1
  require 'fastlane_core/ui/ui'
2
2
 
3
3
  module Fastlane
4
- UI = FastlaneCore::UI unless Fastlane.const_defined?("UI")
4
+ UI = FastlaneCore::UI unless Fastlane.const_defined?(:UI)
5
5
 
6
6
  module Helper
7
7
  class GenericVersionHelper
@@ -31,16 +31,12 @@ module Fastlane
31
31
  # we implement our own version bumping here
32
32
  version_array = current_version.split(".").map(&:to_i)
33
33
  version_array[-1] = version_array[-1] + 1
34
- next_version_number = version_array.join(".")
35
-
36
- next_version_number
34
+ version_array.join(".")
37
35
  end
38
36
 
39
- def self.load_dependencies
37
+ def self.load_dependencies(plugin_name)
40
38
  # this is a hack to install missing plugins in the host project
41
39
  # better solution for @link https://github.com/fastlane/fastlane/issues/16650
42
- plugin_name = 'fastlane-plugin-versioning_android'
43
-
44
40
  unless Fastlane.plugin_manager.plugin_is_added_as_dependency?(plugin_name)
45
41
  Fastlane.plugin_manager.add_dependency(plugin_name)
46
42
  Fastlane.plugin_manager.load_plugins
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module GenericVersion
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-generic_version
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Rudat
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-18 00:00:00.000000000 Z
11
+ date: 2023-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: fastlane-plugin-versioning
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 0.5.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 0.5.0
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: fastlane-plugin-versioning_android
15
29
  requirement: !ruby/object:Gem::Requirement