fastlane-plugin-shorebird 0.1.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 906a806a9ed5cddc29a64435cc1f3e5cae74702ecb34a91fb27f80734048ad8d
4
+ data.tar.gz: e8e37799b476ff35e03be47e52b9c8eaccae2956fe08726846c738f132c2f7b3
5
+ SHA512:
6
+ metadata.gz: 5ac1cb2ca4cd96418edb60938f79eca874ed8fdacebaa8caf7c2d47d431c20b9319c186a5b5b760779d02cb995151c24ad48b71a7ebfa3ea55ef6c02747276d5
7
+ data.tar.gz: a0d373a8363663ca3da609ff74230e0f7fa8b35e64a5bc8b27761f655e493282c34dfcd7d7d9e45623f47a73c746eba7e0c6cce0a6fa1c3e9cb0a0e8753487ee
data/LICENSE ADDED
@@ -0,0 +1,19 @@
1
+ MIT License
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,63 @@
1
+ # Shorebird `fastlane` plugin
2
+
3
+ [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-shorebird)
4
+
5
+ ## Getting Started
6
+
7
+ This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-shorebird`, add it to your project by running:
8
+
9
+ ```bash
10
+ fastlane add_plugin shorebird
11
+ ```
12
+
13
+ ## About shorebird
14
+
15
+ This plugin makes it easy to create Shorebird releases and patches.
16
+
17
+ ## Example
18
+
19
+ This plugin is designed to work with Flutter apps that use Shorebird.
20
+
21
+ In your Flutter app's `ios` and/or `android` directories, initialize Fastlane
22
+ and add this plugin using `bundle exec fastlane add_plugin shorebird`.
23
+
24
+ Then, update your `Fastfile` to include the following:
25
+
26
+ ```ruby
27
+ lane :release_ios do
28
+ shorebird_release(platform: "ios")
29
+ end
30
+ ```
31
+
32
+ This will create a new release on Shorebird for the iOS platform.
33
+
34
+ See https://docs.shorebird.dev/guides/fastlane for more information.
35
+
36
+ ## Run tests for this plugin
37
+
38
+ To run both the tests, and code style validation, run
39
+
40
+ ```
41
+ rake
42
+ ```
43
+
44
+ To automatically fix many of the styling issues, use
45
+ ```
46
+ rubocop -a
47
+ ```
48
+
49
+ ## Issues and Feedback
50
+
51
+ For any other issues and feedback about this plugin, please submit it to this repository.
52
+
53
+ ## Troubleshooting
54
+
55
+ If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.
56
+
57
+ ## Using _fastlane_ Plugins
58
+
59
+ For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).
60
+
61
+ ## About _fastlane_
62
+
63
+ _fastlane_ is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out [fastlane.tools](https://fastlane.tools).
@@ -0,0 +1,46 @@
1
+ require 'fastlane/action'
2
+ require_relative '../helper/shorebird_helper'
3
+
4
+ module Fastlane
5
+ module Actions
6
+ class ShorebirdPatchAction < Action
7
+ def self.run(params)
8
+ Fastlane::Actions.sh("shorebird patch #{params[:platform]} #{params[:args]}".strip)
9
+ end
10
+
11
+ def self.description
12
+ "Create a Shorebird patch"
13
+ end
14
+
15
+ def self.authors
16
+ Helper::ShorebirdHelper.authors
17
+ end
18
+
19
+ def self.details
20
+ "Create a Shorebird patch for the provided platform with the given arguments."
21
+ end
22
+
23
+ def self.available_options
24
+ [
25
+ FastlaneCore::ConfigItem.new(
26
+ key: :platform,
27
+ description: "Which platform to patch (ios,android)",
28
+ optional: false,
29
+ type: String
30
+ ),
31
+ FastlaneCore::ConfigItem.new(
32
+ key: :args,
33
+ description: "The argument string to pass to shorebird release",
34
+ optional: true,
35
+ type: String,
36
+ default_value: ""
37
+ )
38
+ ]
39
+ end
40
+
41
+ def self.is_supported?(platform)
42
+ Helper::ShorebirdHelper.supported_platforms.include?(platform)
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,46 @@
1
+ require 'fastlane/action'
2
+ require_relative '../helper/shorebird_helper'
3
+
4
+ module Fastlane
5
+ module Actions
6
+ class ShorebirdReleaseAction < Action
7
+ def self.run(params)
8
+ Fastlane::Actions.sh("shorebird release #{params[:platform]} #{params[:args]}".strip)
9
+ end
10
+
11
+ def self.description
12
+ "Create a Shorebird release"
13
+ end
14
+
15
+ def self.authors
16
+ Helper::ShorebirdHelper.authors
17
+ end
18
+
19
+ def self.details
20
+ "Create a Shorebird release for the provided platform with the given arguments."
21
+ end
22
+
23
+ def self.available_options
24
+ [
25
+ FastlaneCore::ConfigItem.new(
26
+ key: :platform,
27
+ description: "Which platform to release to (ios,android)",
28
+ optional: false,
29
+ type: String
30
+ ),
31
+ FastlaneCore::ConfigItem.new(
32
+ key: :args,
33
+ description: "The argument string to pass to shorebird release",
34
+ optional: true,
35
+ type: String,
36
+ default_value: ""
37
+ )
38
+ ]
39
+ end
40
+
41
+ def self.is_supported?(platform)
42
+ Helper::ShorebirdHelper.supported_platforms.include?(platform)
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,24 @@
1
+ require 'fastlane_core/ui/ui'
2
+
3
+ module Fastlane
4
+ UI = FastlaneCore::UI unless Fastlane.const_defined?(:UI)
5
+
6
+ module Helper
7
+ class ShorebirdHelper
8
+ # class methods that you define here become available in your action
9
+ # as `Helper::ShorebirdHelper.your_method`
10
+ #
11
+ def self.show_message
12
+ UI.message("Hello from the shorebird plugin helper!")
13
+ end
14
+
15
+ def self.authors
16
+ ["bryanoltman"]
17
+ end
18
+
19
+ def self.supported_platforms
20
+ [:ios, :android]
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,5 @@
1
+ module Fastlane
2
+ module Shorebird
3
+ VERSION = "0.1.0"
4
+ end
5
+ end
@@ -0,0 +1,16 @@
1
+ require 'fastlane/plugin/shorebird/version'
2
+
3
+ module Fastlane
4
+ module Shorebird
5
+ # Return all .rb files inside the "actions" and "helper" directory
6
+ def self.all_classes
7
+ Dir[File.expand_path('**/{actions,helper}/*.rb', File.dirname(__FILE__))]
8
+ end
9
+ end
10
+ end
11
+
12
+ # By default we want to import all available actions and helpers
13
+ # A plugin can contain any number of actions and plugins
14
+ Fastlane::Shorebird.all_classes.each do |current|
15
+ require current
16
+ end
metadata ADDED
@@ -0,0 +1,50 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fastlane-plugin-shorebird
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Shorebird
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2024-06-13 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description:
14
+ email: contact@shorebird.dev
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - LICENSE
20
+ - README.md
21
+ - lib/fastlane/plugin/shorebird.rb
22
+ - lib/fastlane/plugin/shorebird/actions/shorebird_patch_action.rb
23
+ - lib/fastlane/plugin/shorebird/actions/shorebird_release_action.rb
24
+ - lib/fastlane/plugin/shorebird/helper/shorebird_helper.rb
25
+ - lib/fastlane/plugin/shorebird/version.rb
26
+ homepage: https://github.com/shorebirdtech/fastlane-plugin-shorebird
27
+ licenses:
28
+ - MIT
29
+ metadata:
30
+ rubygems_mfa_required: 'true'
31
+ post_install_message:
32
+ rdoc_options: []
33
+ require_paths:
34
+ - lib
35
+ required_ruby_version: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '2.6'
40
+ required_rubygems_version: !ruby/object:Gem::Requirement
41
+ requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ version: '0'
45
+ requirements: []
46
+ rubygems_version: 3.5.11
47
+ signing_key:
48
+ specification_version: 4
49
+ summary: Create Shorebird releases and patches
50
+ test_files: []