mirror of
https://github.com/Instagram/IGListKit
synced 2026-05-24 01:38:26 +00:00
Run pod_setup.sh when Source files are added or removed
Summary: Issue fixed: #1022 - [ ] All tests pass. Demo project builds and runs. - [ ] I added tests, an experiment, or detailed why my change isn't tested. - [ ] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes. - [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md) Closes https://github.com/Instagram/IGListKit/pull/1031 Reviewed By: jeremycohen Differential Revision: D6657283 Pulled By: rnystrom fbshipit-source-id: 3033e08dbe1a0fd5b52f254dbefc924693b84b51
This commit is contained in:
parent
b79130ca35
commit
3d9904950a
1 changed files with 10 additions and 0 deletions
10
Dangerfile
10
Dangerfile
|
|
@ -27,6 +27,16 @@ if has_doc_changes && !has_doc_gen_title
|
|||
message("Docs are generated by using [Jazzy](https://github.com/realm/jazzy). If you want to contribute, please update [markdown guides](https://github.com/Instagram/IGListKit/tree/master/Guides)")
|
||||
end
|
||||
|
||||
# Warn if Source files were added or removed but examples are not updated
|
||||
added_source_files = !git.added_files.grep(/Source/).empty?
|
||||
deleted_source_files = !git.deleted_files.grep(/Source/).empty?
|
||||
ios_pods_not_updated = !git.modified_files.include?("Examples/Examples-iOS/Podfile.lock")
|
||||
macos_pods_not_updated = !git.modified_files.include?("Examples/Examples-macOS/Podfile.lock")
|
||||
tvos_pods_not_updated = !git.modified_files.include?("Examples/Examples-tvOS/Podfile.lock")
|
||||
if (added_source_files || deleted_source_files) && (ios_pods_not_updated || macos_pods_not_updated || tvos_pods_not_updated)
|
||||
warn("Adding or removing library source files requires updating the examples. Please run `./scripts/pod_setup.sh` from the root directory and commit the changes.")
|
||||
end
|
||||
|
||||
swiftlint.verbose = true
|
||||
swiftlint.config_file = '.swiftlint_CI.yml'
|
||||
swiftlint.lint_files(inline_mode: true)
|
||||
|
|
|
|||
Loading…
Reference in a new issue