Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Stencil 0.14.0 (and Swift 5) #127

Merged
merged 47 commits into from
Oct 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
33cf26b
Update Stencil to master.
fortmarek Aug 2, 2020
d8d5336
Update stencil to 0.14.0
fortmarek Aug 24, 2020
5d8db2c
Fix tests.
fortmarek Aug 29, 2020
1d86d06
Update CircleCI config: switch to using a dedicated orb for bundle in…
AliSoftware Aug 29, 2020
44cda1e
Fix swiftlint issues.
fortmarek Aug 29, 2020
09e7134
Update xcodeproj.
fortmarek Aug 29, 2020
07bceb4
Merge branch 'stable' of https://github.com/fortmarek/StencilSwiftKit…
fortmarek Aug 29, 2020
e3ae168
Temporarily update Xcode version.
fortmarek Aug 29, 2020
03d30cd
Revert "Update xcodeproj."
fortmarek Aug 29, 2020
a4ee566
Update bundle deps.
fortmarek Aug 29, 2020
0e96a0f
Update Stencil Pod.
fortmarek Aug 29, 2020
c715c0d
Update Xcode version.
fortmarek Aug 29, 2020
8ee1b0b
Change Rakefile xcode version.
fortmarek Aug 29, 2020
eba5846
Update linux docker image.
fortmarek Aug 29, 2020
4b5c5a8
Downgrade cocoapods-downloader.
fortmarek Aug 29, 2020
16a5f26
Revert "Downgrade cocoapods-downloader."
fortmarek Aug 29, 2020
bec2ce0
Pin rubocop version.
fortmarek Aug 29, 2020
bb90b63
Downgrade psych version.
fortmarek Aug 29, 2020
d4d6d12
Downgrade docker swift version.
fortmarek Aug 29, 2020
b8fcc0a
Upgrade swiftlint version.
fortmarek Aug 29, 2020
f248a63
Fix swiftlint issues.
fortmarek Aug 29, 2020
bc470fc
Revert "Fix swiftlint issues."
fortmarek Aug 29, 2020
2bc49fb
Remove implicit return from opt in rules.
fortmarek Aug 29, 2020
b4a3e12
Add missing files.
fortmarek Aug 29, 2020
3c5e910
Update bundle deps.
fortmarek Aug 29, 2020
5b4ed54
Update linux docker image.
fortmarek Aug 29, 2020
a6872d6
Use custom docker image.
fortmarek Aug 30, 2020
4a0a86e
Temporarily use custom bundle install.
fortmarek Aug 30, 2020
4931824
Update ruby version.
fortmarek Aug 30, 2020
40c8a66
Update swift version.
fortmarek Aug 30, 2020
ed0f435
Update workspace with new pods version.
fortmarek Aug 30, 2020
329390f
Minor cocoapods changes.
fortmarek Aug 30, 2020
6a7a0a0
Add mising pod files.
fortmarek Aug 30, 2020
4cd545e
Add job for swift 4.2.
fortmarek Aug 30, 2020
fd3e40a
Add jobs with swift versions to check-deploy.
fortmarek Aug 30, 2020
76d3e43
Remove dots and digits from job names.
fortmarek Aug 30, 2020
c50951a
Use 5.2 image.
fortmarek Aug 30, 2020
985e418
Remove redundant bundle install.
fortmarek Aug 30, 2020
90778d9
xcode 12
djbe Oct 8, 2020
3dff275
swift 5 package file
djbe Oct 8, 2020
1428321
No idea what these info.plist were doing here
djbe Oct 8, 2020
ccec91d
Update dependencies
djbe Oct 8, 2020
c8ef1fd
Fix code lint issues
djbe Oct 8, 2020
861ea89
Update copyright notice
djbe Oct 8, 2020
c1f1f4f
Use our own docker image
djbe Oct 8, 2020
963b437
Use docker account
djbe Oct 8, 2020
99ac008
Add changelog entry
djbe Oct 9, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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