Skip to content

Commit

Permalink
Merge pull request #127 from fortmarek/stable
Browse files Browse the repository at this point in the history
Update to Stencil 0.14.0 (and Swift 5)
  • Loading branch information
djbe committed Oct 9, 2020
2 parents bd10915 + 99ac008 commit 2737b0b
Show file tree
Hide file tree
Showing 88 changed files with 2,820 additions and 1,565 deletions.
69 changes: 29 additions & 40 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
orbs:
bundle-install: toshimaru/bundle-install@0.3.1

defaults:
- &macos-config
parallelism: 1
Expand All @@ -6,37 +9,23 @@ defaults:
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
BUNDLE_PATH: vendor/bundle
macos:
xcode: "10.0.0"
xcode: "12.0.0"
shell: /bin/bash --login -eo pipefail
- &linux-config
environment:
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
BUNDLE_PATH: vendor/bundle
docker:
- image: norionomura/jazzy:swift-4.2.0
- image: swiftgen/swift:5.3
auth:
username: $DOCKER_HUB_USERNAME
password: $DOCKER_HUB_ACCESS_TOKEN
shell: /bin/bash --login -eo pipefail
- &prepare-storage
run:
name: Create directories for artifacts and reports
command: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
- &restore-gems
restore_cache:
keys:
- &cache-key v1-gems-{{ checksum "Gemfile.lock" }}
- v1-gems-
- &install-gems
run:
name: Bundle install
command: bundle check || bundle install
environment:
BUNDLE_JOBS: 4
BUNDLE_RETRY: 3
- &store-gems
save_cache:
key: *cache-key
paths:
- vendor/bundle
- &fetch-xcode-logs
run:
name: Getting Xcode activity logs
Expand All @@ -46,16 +35,15 @@ defaults:
path: /tmp/circleci-artifacts


version: 2
version: 2.1
jobs:
lint:
<<: *macos-config
steps:
- *prepare-storage
- checkout
- *restore-gems
- *install-gems
- *store-gems
- bundle-install/bundle-install:
cache_key_prefix: v1-macos
- run:
name: Lint source code
command: bundle exec rake lint:code
Expand All @@ -69,9 +57,8 @@ jobs:
steps:
- *prepare-storage
- checkout
- *restore-gems
- *install-gems
- *store-gems
- bundle-install/bundle-install:
cache_key_prefix: v1-macos
- run:
name: Run all tests
command: bundle exec rake xcode:test
Expand All @@ -85,9 +72,8 @@ jobs:
steps:
- *prepare-storage
- checkout
- *restore-gems
- *install-gems
- *store-gems
- bundle-install/bundle-install:
cache_key_prefix: v1-linux
- run:
name: Run all tests
command: bundle exec rake spm:test
Expand All @@ -98,9 +84,8 @@ jobs:
steps:
- *prepare-storage
- checkout
- *restore-gems
- *install-gems
- *store-gems
- bundle-install/bundle-install:
cache_key_prefix: v1-macos
- run:
name: Run all tests
command: bundle exec rake spm:test
Expand All @@ -111,24 +96,28 @@ jobs:
steps:
- *prepare-storage
- checkout
- *restore-gems
- *install-gems
- *store-gems
- run:
name: Download podspec repo
command: curl https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash -s cf
- bundle-install/bundle-install:
cache_key_prefix: v1-macos
- restore_cache:
keys:
- cocoapods-{{ checksum "Podfile.lock" }}
- cocoapods-
- run:
name: Lint podspec
command: bundle exec rake pod:lint
- *store-artifacts
- save_cache:
key: cocoapods-{{ checksum "Podfile.lock" }}
paths:
- ~/.cocoapods


workflows:
version: 2
lint-buildandtest-checkdeploy:
jobs:
- lint
- spm-linux-build-and-test
- spm-linux-build-and-test:
context: Docker
- spm-mac-build-and-test
- xcode-build-and-test
- check-deploy:
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.7
2.6.6
30 changes: 22 additions & 8 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
swiftlint_version: 0.31.0
swiftlint_version: 0.40.3

opt_in_rules:
- anyobject_protocol
Expand All @@ -9,25 +9,32 @@ opt_in_rules:
- closure_spacing
- collection_alignment
- conditional_returns_on_newline
- contains_over_filter_count
- contains_over_filter_is_empty
- contains_over_first_not_nil
- contains_over_range_nil_comparison
- convenience_type
- discouraged_object_literal
- discouraged_optional_boolean
- discouraged_optional_collection
- duplicate_imports
- empty_collection_literal
- empty_count
- empty_string
- empty_xctest_method
- enum_case_associated_values_count
- fallthrough
- fatal_error_message
- file_header
- first_where
- flatmap_over_map_reduce
- force_unwrapping
- identical_operands
- implicit_return
# Enable this once we drop Swift 4
# - implicit_return
- implicitly_unwrapped_optional
- indentation_width
- joined_default_parameter
- last_where
- legacy_multiple
- legacy_random
- literal_expression_end_indentation
- lower_acl_than_parent
Expand All @@ -39,14 +46,19 @@ opt_in_rules:
- multiline_parameters
- multiline_parameters_brackets
- nslocalizedstring_key
- nslocalizedstring_require_bundle
- number_separator
- object_literal
- operator_usage_whitespace
- optional_enum_case_matching
- overridden_super_call
- override_in_extension
- prefer_self_type_over_type_of_self
- prefer_zero_over_explicit_init
- private_action
- private_outlet
- prohibited_super_call
- raw_value_for_camel_cased_codable_enum
- reduce_into
- redundant_nil_coalescing
- sorted_first_last
- sorted_imports
Expand All @@ -57,11 +69,10 @@ opt_in_rules:
- trailing_closure
- unavailable_function
- unneeded_parentheses_in_closure_argument
- unused_setter_value
- unowned_variable_capture
- vertical_parameter_alignment_on_call
- vertical_whitespace_closing_braces
- vertical_whitespace_opening_braces
- weak_computed_property
- xct_specific_matcher
- yoda_condition

Expand All @@ -73,10 +84,13 @@ file_header:
required_pattern: |
\/\/
\/\/ StencilSwiftKit( UnitTests)?
\/\/ Copyright © 2019 SwiftGen
\/\/ Copyright © 2020 SwiftGen
\/\/ MIT Licence
\/\/
indentation_width:
indentation_width: 2

line_length:
warning: 120
error: 200
Expand Down
15 changes: 13 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,28 @@ _None_

### New Features

_None_
* Added support for Swift 5.
[David Jennes](https://github.com/djbe)
[@fortmarek](https://github.com/fortmarek)
[#119](https://github.com/SwiftGen/StencilSwiftKit/pull/119)
[#122](https://github.com/SwiftGen/StencilSwiftKit/pull/122)
[#125](https://github.com/SwiftGen/StencilSwiftKit/pull/125)
[#127](https://github.com/SwiftGen/StencilSwiftKit/pull/127)
* Updated Stencil to the latest version (0.14).
[@fortmarek](https://github.com/fortmarek)
[#127](https://github.com/SwiftGen/StencilSwiftKit/pull/127)

### Bug Fixes

_None_

### Internal Changes

* Update to SwiftLint 0.31.0 and enable some extra SwiftLint rules.
* Update to SwiftLint 0.40.3 and enable some extra SwiftLint rules.
[David Jennes](https://github.com/djbe)
[@fortmarek](https://github.com/fortmarek)
[#116](https://github.com/SwiftGen/StencilSwiftKit/pull/116)
[#127](https://github.com/SwiftGen/StencilSwiftKit/pull/127)

## 2.7.2

Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ end

# In addition to :build, for contributing
group :development do
gem 'cocoapods', '~> 1.6.0'
gem 'cocoapods', '~> 1.9'
gem 'rubocop', '~> 0.65'
end

Expand Down
Loading

0 comments on commit 2737b0b

Please sign in to comment.