fastlane-plugin-sunny_project 0.1.3 → 0.1.4

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: a515090fcca006dc19c431618a5487ee87396f4e663dc3da861100a97e4b6f00
4
- data.tar.gz: 2c515e01ab4c674fca09dc659c68e43a3cc715b72adee7fb2204f3c8fdadc013
3
+ metadata.gz: '00794e8cd4807d4c959dd26f0c36739c9b4317ff9cba32d3a06a1dceae797afe'
4
+ data.tar.gz: 5922485524c4aa963091467002cf0722ee0b3c3d81e5661c5f5feb7facae38f4
5
5
  SHA512:
6
- metadata.gz: 195d698da34785c9587403779566ca69b525e62daad899ac99602751a4254baf1aa7a978dad63e8e771045578d79fb9faa4e8717238b471e1866c6dab0670e7d
7
- data.tar.gz: 1e7e79897ecd1945b1913eb350f90bbe442f5878e14ca09e300b77a16be752a264dc5bd9f9264e8175cabd682267bbb442fa7108191aa6b944824fe5c398eb54
6
+ metadata.gz: 8055fb6b959f289e8ab91cf0225d8ea4bff4c1b166a913fb540510bc26c3faaad28a9807cad1df75b07d64d3bc6ace508f75660e36b3838bf79a0e46e5190d81
7
+ data.tar.gz: 595752d12ab6f375fe529993455bf70c590005fb9681a0aa96d0d072adf7f1b4b4ef413f1715ed91cd30427029ec5c17e230c549a79201dd2597f654d5b596b7
@@ -0,0 +1,102 @@
1
+ require 'fastlane/action'
2
+ # require 'ci'
3
+ require_relative '../helper/sunny_project_helper'
4
+ require 'semantic'
5
+ require_relative '../helper/plugin_options'
6
+
7
+ # def with_captured_stdout
8
+ # original_stdout = FastlaneCore::UI.ui_object
9
+ # str = ''
10
+ # ci_output = FastlaneCI::FastlaneCIOutput.new(
11
+ # each_line_block: proc do |raw_row|
12
+ # str = str + raw_row
13
+ # end
14
+ # )
15
+ #
16
+ # FastlaneCore::UI.ui_object = ci_output
17
+ # yield
18
+ # str
19
+ # ensure
20
+ # FastlaneCore::UI.ui_object = original_stdout
21
+ # end
22
+
23
+ module Fastlane
24
+ module Actions
25
+ class DartPackageStatusAction < Action
26
+ def self.run(options)
27
+ params = FastlaneCore::Configuration.create(Fastlane::SunnyProject::Options.available_options, {})
28
+ params.load_configuration_file("Sunnyfile")
29
+ options.all_keys.each do |key|
30
+ params.set(key, options[key])
31
+ end
32
+ plugins = params[:sunny_plugins]
33
+ branches = params[:sunny_plugins]
34
+ Dir.chdir(params[:sunny_plugin_folder]) do
35
+ plugins.keys.each do |key|
36
+ folder = plugins[key]
37
+ folder_str = ''
38
+ unless key.to_s.eql? folder.to_s
39
+ folder_str = " (folder=#{folder})"
40
+ end
41
+ UI.command_output "############### #{key} #{folder_str}"
42
+ if !File.exists? "./#{folder_str}"
43
+ UI.important " > folder is missing"
44
+ else
45
+ Dir.chdir("./#{folder}") do
46
+ res = ''
47
+ begin
48
+ Fastlane::Actions::EnsureGitStatusCleanAction.run({})
49
+ rescue StandardError => e
50
+ UI.important " >> failed to check git status << #{e.message}"
51
+ unless res == ''
52
+ UI.important " >> #{res}"
53
+ end
54
+ if params[:sunny_verbose]
55
+ UI.user_error! "#{e.backtrace}"
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
62
+ end
63
+ end
64
+
65
+
66
+ def self.convert_options(options)
67
+ o = options.__hash__.dup
68
+ o.delete(:verbose)
69
+ o
70
+ end
71
+
72
+ def self.description
73
+ "Get or retrieve release notes from git"
74
+ end
75
+
76
+ def self.authors
77
+ ["ericmartineau"]
78
+ end
79
+
80
+ def self.return_value
81
+ # If your method provides a return value, you can describe here what it does
82
+ end
83
+
84
+ def self.details
85
+ # Optional:
86
+ ""
87
+ end
88
+
89
+ def self.available_options
90
+ Fastlane::SunnyProject::Options.available_options
91
+ end
92
+
93
+ def self.is_supported?(platform)
94
+ # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
95
+ # See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform
96
+ #
97
+ # [:ios, :mac, :android].include?(platform)
98
+ true
99
+ end
100
+ end
101
+ end
102
+
@@ -0,0 +1,43 @@
1
+ require 'fastlane_core/configuration/config_item'
2
+ require 'fastlane/helper/lane_helper'
3
+
4
+ module Fastlane
5
+ module SunnyProject
6
+ class Options
7
+ # This is match specific, as users can append storage specific options
8
+ def self.append_option(option)
9
+ self.available_options # to ensure we created the initial `@available_options` array
10
+ self.available_options.merge(option)
11
+ end
12
+
13
+ def self.available_options
14
+ [
15
+ FastlaneCore::ConfigItem.new(key: :sunny_plugins,
16
+ env_name: "SUNNY_PLUGINS",
17
+ description: "The plugins",
18
+ type: Hash,
19
+ optional: true,),
20
+ FastlaneCore::ConfigItem.new(key: :sunny_plugin_folder,
21
+ env_name: "SUNNY_PLUGIN_FOLDER",
22
+ description: "Folder that contains the packages",
23
+ type: String,
24
+ optional: false,
25
+ default_value: '../plugin'),
26
+
27
+ FastlaneCore::ConfigItem.new(key: :sunny_plugins_branches,
28
+ env_name: "SUNNY_PLUGINS_BRANCHES",
29
+ description: "Specific branches to use",
30
+ type: Hash,
31
+ optional: true,),
32
+ FastlaneCore::ConfigItem.new(key: :sunny_verbose,
33
+ env_name: "SUNNY_VERBOSE",
34
+ description: "Whether to print out more debug",
35
+ type: Boolean,
36
+ optional: true,
37
+ default_value: false),
38
+
39
+ ]
40
+ end
41
+ end
42
+ end
43
+ end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module SunnyProject
3
- VERSION = "0.1.3"
3
+ VERSION = "0.1.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-sunny_project
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - ericmartineau
@@ -10,6 +10,20 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2020-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: ci
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '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'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: pry
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -128,14 +142,14 @@ dependencies:
128
142
  requirements:
129
143
  - - ">="
130
144
  - !ruby/object:Gem::Version
131
- version: 2.160.0
145
+ version: 2.168.0
132
146
  type: :development
133
147
  prerelease: false
134
148
  version_requirements: !ruby/object:Gem::Requirement
135
149
  requirements:
136
150
  - - ">="
137
151
  - !ruby/object:Gem::Version
138
- version: 2.160.0
152
+ version: 2.168.0
139
153
  description:
140
154
  email: smartytime@gmail.com
141
155
  executables: []
@@ -146,15 +160,15 @@ files:
146
160
  - README.md
147
161
  - lib/fastlane/plugin/sunny_project.rb
148
162
  - lib/fastlane/plugin/sunny_project/actions/curr_semver_action.rb
149
- - lib/fastlane/plugin/sunny_project/actions/dart_packages_status_action.rb
163
+ - lib/fastlane/plugin/sunny_project/actions/dart_package_status_action.rb
150
164
  - lib/fastlane/plugin/sunny_project/actions/finalize_version_action.rb
151
165
  - lib/fastlane/plugin/sunny_project/actions/generate_icons_action.rb
152
166
  - lib/fastlane/plugin/sunny_project/actions/increase_version_action.rb
153
167
  - lib/fastlane/plugin/sunny_project/actions/pub_publish_action.rb
154
168
  - lib/fastlane/plugin/sunny_project/actions/release_notes_action.rb
155
169
  - lib/fastlane/plugin/sunny_project/actions/rename_assets_action.rb
170
+ - lib/fastlane/plugin/sunny_project/helper/plugin_options.rb
156
171
  - lib/fastlane/plugin/sunny_project/helper/sunny_project_helper.rb
157
- - lib/fastlane/plugin/sunny_project/options/plugin_options.rb
158
172
  - lib/fastlane/plugin/sunny_project/version.rb
159
173
  homepage: https://github.com/SunnyApp/fastlane-plugin-sunny_project
160
174
  licenses:
@@ -1,45 +0,0 @@
1
- require 'fastlane/action'
2
- require 'fastlane_core'
3
- require 'fastlane_core/ui/ui'
4
-
5
- require_relative '../helper/sunny_project_helper'
6
- require_relative '../options/plugin_options'
7
- require 'semantic'
8
-
9
- module Fastlane
10
- UI = FastlaneCore::UI unless Fastlane.const_defined?("UI")
11
- module Actions
12
- class DartPackagesStatus < Fastlane::Action
13
- def self.run(options)
14
- params = FastlaneCore::Configuration.create(SunnyPlugin::Options.available_options, options.__hash__)
15
- params.load_configuration_file("Sunnyfile")
16
- "Hello #{params.pretty_print}"
17
- end
18
-
19
- def self.description
20
- "Checks status of plugins modules"
21
- end
22
-
23
- def self.authors
24
- ["ericmartineau"]
25
- end
26
-
27
- def self.return_value
28
- # If your method provides a return value, you can describe here what it does
29
- end
30
-
31
- def self.details
32
- # Optional:
33
- ""
34
- end
35
-
36
- def self.available_options
37
- SunnyPluginOptions.available_options
38
- end
39
-
40
- def self.is_supported?(platform)
41
- true
42
- end
43
- end
44
- end
45
- end
@@ -1,33 +0,0 @@
1
- require 'fastlane_core/configuration/config_item'
2
- require 'fastlane/helper/lane_helper'
3
-
4
- module Fastlane
5
- module SunnyProject
6
- class SunnyPluginOptions
7
- # This is match specific, as users can append storage specific options
8
- def self.append_option(option)
9
- self.available_options # to ensure we created the initial `@available_options` array
10
- @available_options << option
11
- end
12
-
13
- def self.default_platform
14
- case Fastlane::Helper::LaneHelper.current_platform.to_s
15
- when "mac"
16
- "macos"
17
- else
18
- "ios"
19
- end
20
- end
21
-
22
- def self.available_options
23
- [
24
- FastlaneCore::ConfigItem.new(key: :sunny_plugins,
25
- env_name: "SUNNY_PLUGINS",
26
- description: "The plugins",
27
- type: Hash,
28
- optional: false,)
29
- ]
30
- end
31
- end
32
- end
33
- end