fastlane-plugin-release 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 8cea9c1e6fefa3d08fbca226dbf0a1d98d243e33d2f03840509801d217c0a6ef
4
+ data.tar.gz: 78da457f16bdd4530364eafbb9e856a65ecd31e5597452f70f2dd58b0fb0ba3f
5
+ SHA512:
6
+ metadata.gz: ded1f35e560ced58f710ebee65cbb1b0073c8c110d3ed9c85bac94d96f5f786bda1013f112013aff0c179076bacbbcf42e4e0295f241e40792eac49ded869df6
7
+ data.tar.gz: 12be6d1bac1435858f9ca9f54148c8f366b1e5e34c391c717b52019e51f8c010f0b1a198bf00ad9585f1f1eb55135252d72def46d364d0e0b5daa28a46e9c31e
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 Cole Dunsby <coledunsby@gmail.com>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,62 @@
1
+ # release fastlane plugin
2
+
3
+ [![License](https://img.shields.io/github/license/Coledunsby/fastlane-plugin-release.svg)](https://github.com/Coledunsby/fastlane-plugin-release/blob/master/LICENSE)
4
+ [![Gem](https://img.shields.io/gem/v/fastlane-plugin-release.svg?style=flat)](http://rubygems.org/gems/fastlane-plugin-release)
5
+ [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-podspec_dependency_versioning)
6
+
7
+ ## Getting Started
8
+
9
+ This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-release`, add it to your project by running:
10
+
11
+ ```bash
12
+ fastlane add_plugin release
13
+ ```
14
+
15
+ ## About release
16
+
17
+ Extends fastlane release actions. Automates the steps to create a new release for a framework.
18
+
19
+ ## Actions
20
+
21
+ ### make_release
22
+
23
+ |parameter|optional|default|description|
24
+ |---------|--------|-------|-----------|
25
+ |xcodeproj|false||The path of the xcode project|
26
+ |podspec|false||The path of the podspec|
27
+ |allow_warnings|true|`true`|Allow warnings during pod push|
28
+ |bump_build|true|`false`|Increments the build number; optional|
29
+ |ensure_git_branch|true|`"master"`|The branch that should be checked for|
30
+ |ensure_git_status_clean|true|`true`|Raises an exception if there are uncommitted git changes|
31
+ |podspec_repo|true|`"Trunk"`|The podspec repo|
32
+ |sources|true|`["https://github.com/CocoaPods/Specs"]`|The sources of repos you want the pod spec to lint with|
33
+ |tag_prefix|true|`""`|A prefix to be added to the version tag (e.g. "v/")|
34
+ |version|true|`nil`|Change to a specific version. Cannot be used in conjuction with version_bump_type|
35
+ |version_bump_type|true|`"patch"`|The type of this version bump. Available: patch, minor, major|
36
+
37
+
38
+ A typical use case could look something like this:
39
+ ```ruby
40
+ make_release(
41
+ xcodeproj: "Nitrous.xcodeproj",
42
+ podspec: "Nitrous.podspec",
43
+ podspec_repo: "coledunsby",
44
+ tag_prefix: "v/"
45
+ )
46
+ ```
47
+
48
+ ## Issues and Feedback
49
+
50
+ For any other issues and feedback about this plugin, please submit it to this repository.
51
+
52
+ ## Troubleshooting
53
+
54
+ If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.
55
+
56
+ ## Using _fastlane_ Plugins
57
+
58
+ For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).
59
+
60
+ ## About _fastlane_
61
+
62
+ _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,13 @@
1
+ require 'fastlane/plugin/release/version'
2
+
3
+ module Fastlane
4
+ module Release
5
+ def self.all_classes
6
+ Dir[File.expand_path('**/{actions,helper}/*.rb', File.dirname(__FILE__))]
7
+ end
8
+ end
9
+ end
10
+
11
+ Fastlane::Release.all_classes.each do |current|
12
+ require current
13
+ end
@@ -0,0 +1,164 @@
1
+ require 'fastlane/action'
2
+ require_relative '../helper/make_release_helper'
3
+
4
+ module Fastlane
5
+
6
+ module Actions
7
+
8
+ class MakeReleaseAction < Action
9
+
10
+ def self.run(params)
11
+
12
+ other_action.ensure_git_branch(branch: params[:ensure_git_branch])
13
+ other_action.ensure_git_status_clean if params[:ensure_git_status_clean]
14
+
15
+ xcodeproj = File.expand_path(params[:xcodeproj])
16
+ podspec = File.expand_path(params[:podspec])
17
+ version = params[:version]
18
+
19
+ if version.nil?
20
+ version = other_action.version_bump_podspec(path: podspec, bump_type: params[:version_bump_type])
21
+ else
22
+ other_action.version_bump_podspec(path: podspec, version_number: version)
23
+ end
24
+
25
+ other_action.increment_version_number(version_number: version, xcodeproj: xcodeproj)
26
+ other_action.increment_build_number(xcodeproj: xcodeproj) if params[:bump_build]
27
+ other_action.commit_version_bump(include: [params[:podspec]])
28
+ other_action.add_git_tag(tag: params[:tag_prefix] + version)
29
+ other_action.push_to_git_remote
30
+
31
+ other_action.pod_push(
32
+ path: podspec,
33
+ repo: params[:podspec_repo],
34
+ allow_warnings: params[:allow_warnings],
35
+ sources: params[:sources]
36
+ )
37
+
38
+ version
39
+
40
+ end
41
+
42
+ def self.description
43
+ "Automates the steps to create a new release for a framework."
44
+ end
45
+
46
+ def self.authors
47
+ ["Cole Dunsby"]
48
+ end
49
+
50
+ def self.return_value
51
+ "The new version"
52
+ end
53
+
54
+ def self.details
55
+ "Automates the steps to create a new release for a framework."
56
+ end
57
+
58
+ def self.available_options
59
+ [
60
+ FastlaneCore::ConfigItem.new(
61
+ key: :allow_warnings,
62
+ env_name: "ALLOW_WARNINGS",
63
+ default_value: true,
64
+ description: "Allow warnings during pod push",
65
+ optional: true,
66
+ type: Boolean
67
+ ),
68
+ FastlaneCore::ConfigItem.new(
69
+ key: :bump_build,
70
+ env_name: "BUMP_BUILD",
71
+ default_value: false,
72
+ description: "Will increment build number if enabled",
73
+ optional: true,
74
+ type: Boolean
75
+ ),
76
+ FastlaneCore::ConfigItem.new(
77
+ key: :ensure_git_branch,
78
+ env_name: "ENSURE_GIT_BRANCH",
79
+ default_value: "master",
80
+ description: "The branch that should be checked for. String that can be either the full name of the branch or a regex to match",
81
+ optional: true,
82
+ type: String
83
+ ),
84
+ FastlaneCore::ConfigItem.new(
85
+ key: :ensure_git_status_clean,
86
+ env_name: "ENSURE_GIT_STATUS_CLEAN",
87
+ default_value: true,
88
+ description: "Raises an exception if there are uncommitted git changes",
89
+ optional: true,
90
+ type: Boolean
91
+ ),
92
+ FastlaneCore::ConfigItem.new(
93
+ key: :podspec,
94
+ env_name: "PODSPEC",
95
+ description: "The path of the podspec file to update",
96
+ optional: false,
97
+ type: String,
98
+ verify_block: proc do |value|
99
+ UI.user_error!("Could not find podspec at path '#{File.expand_path(value)}'") if !File.exist?(value)
100
+ end
101
+ ),
102
+ FastlaneCore::ConfigItem.new(
103
+ key: :podspec_repo,
104
+ env_name: "PODSPEC_REPO",
105
+ default_value: "Trunk",
106
+ description: "The repo you want to push. Pushes to Trunk by default",
107
+ optional: true,
108
+ type: String
109
+ ),
110
+ FastlaneCore::ConfigItem.new(
111
+ key: :sources,
112
+ env_name: "SOURCES",
113
+ default_value: ["https://github.com/CocoaPods/Specs"],
114
+ description: "The sources of repos you want the pod spec to lint with, separated by commas",
115
+ optional: true,
116
+ type: Array
117
+ ),
118
+ FastlaneCore::ConfigItem.new(
119
+ key: :tag_prefix,
120
+ env_name: "TAG_PREFIX",
121
+ default_value: "",
122
+ description: "A prefix to be added to the version tag (e.g \"v/\")",
123
+ optional: true,
124
+ type: String
125
+ ),
126
+ FastlaneCore::ConfigItem.new(
127
+ key: :version,
128
+ env_name: "VERSION",
129
+ conflicting_options: [:version_bump_type],
130
+ description: "Change to a specific version. This will replace the bump type value",
131
+ optional: true,
132
+ type: String
133
+ ),
134
+ FastlaneCore::ConfigItem.new(
135
+ key: :version_bump_type,
136
+ env_name: "VERSION_BUMP_TYPE",
137
+ conflicting_options: [:version],
138
+ default_value: "patch",
139
+ description: "The type of this version bump. Available: patch, minor, major",
140
+ optional: true,
141
+ type: String,
142
+ verify_block: proc do |value|
143
+ UI.user_error!("Available values are 'patch', 'minor' and 'major'") unless ['patch', 'minor', 'major'].include?(value)
144
+ end
145
+ ),
146
+ FastlaneCore::ConfigItem.new(
147
+ key: :xcodeproj,
148
+ env_name: "XCODEPROJ",
149
+ description: "The path of the xcode project to update",
150
+ optional: false,
151
+ type: String,
152
+ verify_block: proc do |value|
153
+ UI.user_error!("Could not find xcode project at path '#{File.expand_path(value)}'") if !File.exist?(value)
154
+ end
155
+ )
156
+ ]
157
+ end
158
+
159
+ def self.is_supported?(platform)
160
+ [:ios, :mac].include?(platform)
161
+ end
162
+ end
163
+ end
164
+ end
@@ -0,0 +1,12 @@
1
+ require 'fastlane_core/ui/ui'
2
+
3
+ module Fastlane
4
+
5
+ UI = FastlaneCore::UI unless Fastlane.const_defined?("UI")
6
+
7
+ module Helper
8
+ class MakeReleaseHelper
9
+
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,5 @@
1
+ module Fastlane
2
+ module Release
3
+ VERSION = "0.1.0"
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,175 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fastlane-plugin-release
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Cole Dunsby
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-07-05 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: pry
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec_junit_formatter
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubocop
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '='
88
+ - !ruby/object:Gem::Version
89
+ version: 0.49.1
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '='
95
+ - !ruby/object:Gem::Version
96
+ version: 0.49.1
97
+ - !ruby/object:Gem::Dependency
98
+ name: rubocop-require_tools
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: simplecov
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: fastlane
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: 2.99.0
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: 2.99.0
139
+ description:
140
+ email: coledunsby@gmail.com
141
+ executables: []
142
+ extensions: []
143
+ extra_rdoc_files: []
144
+ files:
145
+ - LICENSE
146
+ - README.md
147
+ - lib/fastlane/plugin/release.rb
148
+ - lib/fastlane/plugin/release/actions/make_release_action.rb
149
+ - lib/fastlane/plugin/release/helper/make_release_helper.rb
150
+ - lib/fastlane/plugin/release/version.rb
151
+ homepage: https://github.com/Coledunsby/fastlane-plugin-release
152
+ licenses:
153
+ - MIT
154
+ metadata: {}
155
+ post_install_message:
156
+ rdoc_options: []
157
+ require_paths:
158
+ - lib
159
+ required_ruby_version: !ruby/object:Gem::Requirement
160
+ requirements:
161
+ - - ">="
162
+ - !ruby/object:Gem::Version
163
+ version: '0'
164
+ required_rubygems_version: !ruby/object:Gem::Requirement
165
+ requirements:
166
+ - - ">="
167
+ - !ruby/object:Gem::Version
168
+ version: '0'
169
+ requirements: []
170
+ rubyforge_project:
171
+ rubygems_version: 2.7.3
172
+ signing_key:
173
+ specification_version: 4
174
+ summary: Automates the steps to create a new release for a project.
175
+ test_files: []