Improve the version bump process to include test verification and linting

This commit is contained in:
Daniel Saidi 2020-09-05 11:30:35 +02:00
parent db828e1869
commit e56f64daa3
3 changed files with 37 additions and 1 deletions

View File

@ -1,4 +1,5 @@
disabled_rules: disabled_rules:
- identifier_name
- trailing_whitespace - trailing_whitespace
- type_name - type_name
- vertical_whitespace - vertical_whitespace

View File

@ -4,11 +4,41 @@ default_platform :ios
platform :ios do platform :ios do
# Lint =======================
desc "Run SwiftLint"
lane :lint do
swiftlint(strict: true)
end
# Test ===================
desc "Run unit tests"
lane :test do
# Note: Since UIKit tests must be run from a project and
# this project has no such project, we instead ask for a
# confirmation that the test suite has been run.
# resolve_dependencies
# run_tests(scheme: "KeyboardKit")
confirm = prompt(text: "Have you successfully run all unit tests? [y/n]: ")
if confirm != "y"
UI.user_error!("You must run all unit tests before releasing a new version!")
end
end
# Version ================
desc "Create a new version" desc "Create a new version"
lane :version do |options| lane :version do |options|
ensure_git_status_clean ensure_git_status_clean
ensure_git_branch(branch: 'master') ensure_git_branch(branch: 'master')
lint
test
bump_type = options[:type] bump_type = options[:type]
if bump_type == nil or bump_type.empty? if bump_type == nil or bump_type.empty?
bump_type = "patch" bump_type = "patch"

View File

@ -3,6 +3,11 @@
I will bump revision by revision, until SwiftKit has all functionality that it should have from iExtra. I will then bump it to `1.0.0`. I will bump revision by revision, until SwiftKit has all functionality that it should have from iExtra. I will then bump it to `1.0.0`.
## 0.3.0
This version adds improved support for watchOS and tvOS.
## 0.2.0 ## 0.2.0
This version adds: This version adds:
@ -10,7 +15,7 @@ This version adds:
* new `Localization` utilities, like `Translator`s and `LocalizationService`s. * new `Localization` utilities, like `Translator`s and `LocalizationService`s.
* new `FileDirectoryService` utilities. * new `FileDirectoryService` utilities.
This version also adds macOS 10. This version also adds macOS support.
## 0.1.0 ## 0.1.0