Commit Graph

1006 Commits

Author SHA1 Message Date
Pedro Piñera Buendía 9f23d28598
Add utility to read the https://github.com credentials from the system (#3110)
* Add GitEnvironment utility

* Add tests

* Update CHANGELOG

* Address comments
2021-07-01 14:37:22 +02:00
Kamil Harasimowicz aca372af90
📦 Fixed: The `tuist dependencies fetch` command fails. (#3108)
* [fix-carthage-dependencies] remove - unused properties from `CarthageVersionFile`

* [fix-carthage-dependencies] change - update unit tests

* [fix-carthage-dependencies] fix - cleaning

* [fix-carthage-dependencies] fix - run `./fourier format swift --fix`

* [fix-carthage-dependencies] change - update changelog

* Update CHANGELOG.md

Co-authored-by: Daniele Formichelli <df@bendingspoons.com>

Co-authored-by: Daniele Formichelli <df@bendingspoons.com>
2021-06-26 10:49:34 +02:00
Marek Fořt 29b683c1e2
Search manifests only in current directory when passed (#3097) 2021-06-25 11:15:16 +02:00
Marek Fořt 563b347508
Throw error when cache source not found (#3104)
* Throw error when cache source not found

* Edit CHANGELOG

* Sort targets in cache mapper test
2021-06-25 11:12:28 +02:00
Iain Smith ba4dfa9234
Support XCFrameworks with missing architectures in the Info.plist (#3095)
Handle the case where users have deleted a binary from
an xcframework to save binary size (e.g maccatalyst) but
left the reference in the Info.plist. Provide a warning
to let users know their xcframework is missing an
architecture.

This is typically a recoverable error as long as there is 1
valid architecture tuist can use.
2021-06-24 08:31:54 +02:00
Wojciech Kulik 0d41afa378
Added disableBundleAccessors config generation option (#3088)
* Added disableBundleAccessors config generation option

* Code review changes

* Fixed formatting
2021-06-22 08:30:52 +02:00
Kas 46214bace7
Omit `runPostActionsOnFailure` scheme attribute when not enabled (#3087)
* Omit `runPostActionsOnFailure` scheme attribute when not enabled

Resolves: https://github.com/tuist/tuist/issues/2991

- Xcode automatically removes the `runPostActionsOnFailure` when not enabled
- This causes projects to get modified by Xcode after generation even though semantically they are equivalent (causes issues for workflows where generated issues are checked in)
- To mitigate this, the `runPostActionsOnFailure` is omitted incase it's not enabled and only set when enabled

Test Plan:

- Generate a fixture that does't have the `runPostActionsOnFailure` option enabled

e.g.

```sh
swift build
swift run tuist generate --path projects/tuist/fixtures/ios_app_with_tests
```

- Verify the generated schemes do not contain the `runPostActionsOnFailure` attribute
- Generate a fixture that has the `runPostActionsOnFailure` option enabled

```sh
swift build
swift run tuist generate --path projects/tuist/fixtures/ios_app_with_custom_scheme
```

- Verify the App-debug scheme's build action has the `runPostActionsOnFailure` set

* update change log

* Update meta tuist manifest
2021-06-21 18:58:21 +02:00
Marek Fořt 77ec006674
Rename ValueGraph to Graph (#3083) 2021-06-21 08:30:12 +02:00
Marek Fořt 30482ff513
Fix tuist edit when path has spaces (#3084)
Resolves https://github.com/tuist/tuist/issues/3081

- Wrap paths into quotation marks

Test Plan:

- Create a Project.swift file in a folder with spaces in the path
- `tuist local 1.44.0`
- `tuist bundle`
- `tuist edit`
-  Attempt the build the Manifest project
- Verify it succeeds without errors
2021-06-21 06:42:42 +01:00
Daniel Jankowski 35fa0d1224
Add --skip-ui-tests parameter to tuist test command (#2832)
* Add --skip-ui-tests parameter to tuist test command

* Add changelog entry

* Fix formatting

* Add unit tests target in tests

* Rename PruneUITestsProjectMapperTests to SkipUITestsProjectMapperTests

* Rename skipUiTests to skipUITests

* Restore Package.resolved

* Update documentation

* Get rid of short for skip ui tests flag and update the docs
2021-06-19 21:13:50 +02:00
Sven Münnich 71b0bf3792
Fix generated variant groups for localized Interface Builder files (#3075)
When localizing Interface Builder files (i.e. `.xib` and `.storyboard`) using Xcode, any localization files (`.strings`) or language specific versions of the IB file are nested into a _variant group_ , which also contains the main IB file itself. As a result only the IB file is included in the _copy resources_ build phase.

Prior to this PR, Tuist just grouped any localized files based on their file name (including extension) and the custom behavior for localized IB files was not applied.

Now _variant groups_ are formed based on the path and file name, without considering the extension. This allows IB files to share a group with respective `.strings` files. Furthermore such `.strings` files are no longer added to the _copy resources_ build phase.
2021-06-18 12:08:39 +01:00
Kamil Harasimowicz bc798f7063
[Dependencies.swift] Generate `DependenciesGraph` for `Carthage` dependencies. (#3043)
* [carthage-graph] fix - typo

* [carthage-graph] add - `Constants.DependenciesDirectory.graphName`

* [carthage-graph] fix - logging

* [carthage-graph] change - improve `app_with_framework_and_tests_and_dependencies` fixture

* [carthage-graph] add - init `DependenciesGraph`

* [carthage-graph] add - unit tests

* [carthage-graph] change - merge `X_Interactor.fetch` and `X_Interactor.update` into `X_Interactor.install`

* [carthage-graph] change - mark `WIP` places

* [carthage-graph] add - `XCTestCase.XCTAssertDecodableEqualToJson`

* [carthage-graph] add - `CarthageVersionFile` model

* [carthage-graph] fix - adjustments after rebasing onto `main`

* [carthage-graph] add - `DependenciesGraphNode`

* [carthage-graph] add - `CarthageGraphGenerator`

* [carthage-graph] add - `TuistCore.DependenciesGraphController`

* [carthage-graph] fix - generating `graph.json`

* [carthage-graph] change - encode `DependenciesGraph` with `prettyPrinted` option

* [carthage-graph] add - supported architectures to `DependenciesGraphNode.xcframework`

* [carthage-graph] add - set `frameworkPath` in `DependenciesGraphNode.xcframework`

* [carthage-graph] change - update documentation

* [carthage-graph] change - update documentation

* [carthage-graph] change - update acceptance tests

* [carthage-graph] fix - run `./fourier format swift --fix`

* [carthage-graph] change - move `DependenciesGraphController` from `TuistCore` to `TuistDependencies`

* [carthage-graph] fix - typos

* [carthage-graph] change - update `CocoaPodsInteracting` api

* [carthage-graph] change - [Carthage] drop support for production of regular frameworks

* [carthage-graph] fix - typos

* [carthage-graph] change - `DependenciesGraph` adjustments

* [carthage-graph] add - `DependenciesGraphControlling.clean`

* [carthage-graph] add - unit tests for `CarthageGraphGenerator`

* [carthage-graph] add - unit tests for `DependenciesGraphController`

* [carthage-graph] add - more unit tests for `DependenciesController`

* [carthage-graph] add - more unit tests to `CarthageInteractor`

* [carthage-graph] change - update documentation

* [carthage-graph] change - update changelog

* [carthage-graph] fix - run `./fourier format swift --fix`

* [carthage-graph] fix - typo

* [carthage-graph] change - `CarthageDependencies` and `SwiftPackageManagerDependencies`  confirm `ExpressibleByArrayLiteral`

* [carthage-graph] change - `compactMapValues` instead of `reduce`

* [carthage-graph] change - save empty graph when no results

* [carthage-graph] fix - acceptance tests

* [carthage-graph] change - update documentation

* [carthage-graph] fix - run `./fourier format swift --fix`

* [carthage-graph] fix - unit tests

* [carthage-graph] fix - acceptance tests

* [carthage-graph] fix - code review remarks

* [carthage-graph] fix - code review remarks

* [carthage-graph] fix - acceptance tests
2021-06-11 14:01:22 +02:00
Roman Blum 27734a07ca
Support for tvOS Top Shelf Extensions (#2793)
* Support for tvOS app extensions

* Make tv extension being added to targets

* Update CHANGELOG

* Add tvOS Fixture

* Add `tvTopShelfExtension` and `tvIntentsExtension` according to https://github.com/tuist/XcodeProj/pull/609

* Only make `tvTopShelfExtension` available, for the moment

* Fix fixture

* Fix compiler errors

* Add (commented out) .tvIntentsExtension case

* Add suggestions from @kwridan

* Fix package type

* Run swiftformat

Co-authored-by: Roman Blum <roman.blum1@swisscom.com>
Co-authored-by: Kas <kwridan@users.noreply.github.com>
2021-06-08 11:11:09 +02:00
Marek Fořt e69f70b03f
Tasks plugin (#3013)
* Create Tasks model

* Run custom task

* Create tasks fixture test

* Add task options

* Rename load arguments for Tasks

* Foprmat code

* WIP: Change tasks to work with multiple files

* Run task without options

* Parse options with regex

* Remove optional and required options

* Move Task model to ProjectAutomation

* WIP: Editing tasks

* Editing tasks

* Add task documentation

* WIP tests

* Add tests

* Format code

* Rename task command to exec

* Create PluginTasks

* Add tasks plugin fixture

* Add tests

* Add documentation

* Format code

* Edit CHANGELOG

* Fix typo

* Update projects/docs/docs/plugins/creating-plugins.md

Co-authored-by: Luis Padron <luis.padron@compass.com>

Co-authored-by: Luis Padron <luis.padron@compass.com>
Co-authored-by: Pedro Piñera Buendía <pedro@ppinera.es>
2021-06-01 13:09:38 +02:00
Alfredo Delli Bovi dc664d0ec4
Change severity of product name linting to warning (#3018) 2021-06-01 12:59:12 +02:00
Alfredo Delli Bovi f607f53517
Sort autogenerated scheme targets for workspace (#3019) 2021-05-31 11:12:53 +02:00
Luis Padron 11ded30e81 Add `tuist run` command 2021-05-29 12:59:57 -04:00
Kamil Harasimowicz 9fdb4fd3b5
[fix-typos] fix - typos (#3015) 2021-05-28 18:07:16 +02:00
Kamil Harasimowicz 99f095e113
Allow to specify `swift-tools-version` in the `Dependencies.swift` manifest file. (#2998)
* [swift-tools-version] add - `SwiftPackageManagerControlling.setToolsVersion`

* [swift-tools-version] remove - hardcoded `// swift-tools-version:5.3`

* [swift-tools-version] add - `Config.swiftToolsVersion`

* [swift-tools-version] change - move `Config.GenerationOption.swiftToolsVersion` to `Config.swiftToolsVersion`

* [swift-tools-version] change - move `Config.swiftToolsVerstion` to `SwiftPackageManagerDependencies.Options.swiftToolsVersion`

* [swift-tools-version] add - `SwiftPackageManagerDependencies.swiftToolsVersion`

* [swift-tools-version] change - update `swift-tools-version`

* [swift-tools-version] change - update `app_with_framework_and_tests_and_dependencies"

* [swift-tools-version] change - update documentation

* [swift-tools-version] fix - remove unused comments

* [swift-tools-version] fix - run `./fourier format swift --fix`

* [swift-tools-version] change - update changelog

* [swift-tools-version] fix - fixes after updating with `main`

* [swift-tools-version] fix - acceptance tests

* [swift-tools-version] change - move `SwiftPackageManagerDependencies.Options.swiftToolsVersion` to `Config.swiftVersion`

* [swift-tools-version] fix - acceptance tests

* [swift-tools-version] change - update changelog

* [swift-tools-version] change - update documentation

* [swift-tools-version] fix - run `./fourier format swift --fix`
2021-05-27 09:22:57 +02:00
Santiago A. Delgado 74fbf0179b
Adding option .directory for scaffolding templates (#2985)
* [WIP] Adding  option for scaffolding files

* Use of file manager for copying folder, removed recursive copy files

* adding documentation in `scaffold.md` and unit test modified for support `.directory` option

* Update CHANGELOG.md

Co-authored-by: Daniele Formichelli <df@bendingspoons.com>

* Adding acceptance testing

* changing `Template.File` for `Template.Item` and other comment in PR

* Fixing references for items/files in templates

Co-authored-by: Daniele Formichelli <df@bendingspoons.com>
2021-05-25 12:32:03 +02:00
Pedro Piñera Buendía 6e58ef29d6
Cloud to lab (#2993) 2021-05-22 09:58:02 +02:00
Daniele Formichelli 47302ff08f
[Scaffold] Wire plugins to `tuist scaffold list` command (#2958)
* feat: wire plugins to `tuist scaffold list` command

* docs: add changelog entry

* test: add test for `tuist scaffold list` with plugins

* Fix linting issues

Co-authored-by: Pedro Piñera <pedro@ppinera.es>
2021-05-21 15:12:26 +02:00
Marek Fořt 1f776e728f
Tasks (#2816)
* Create Tasks model

* Run custom task

* Create tasks fixture test

* Add task options

* Rename load arguments for Tasks

* Foprmat code

* WIP: Change tasks to work with multiple files

* Run task without options

* Parse options with regex

* Remove optional and required options

* Skip building project description helpers for tasks

* Move Task model to ProjectAutomation

* WIP: Editing tasks

* Editing tasks

* Add task documentation

* WIP tests

* Add tests

* Format code

* Limit file named in step definitions

* Fix ruby code format

* Rename task command to exec

* Trigger CI workflows

Co-authored-by: Pedro Piñera <pedro@ppinera.es>
2021-05-20 12:28:11 +02:00
Steve Kalkwarf 2aad8b9cd9
Fix typo (#2966) 2021-05-18 20:53:15 +02:00
Peter Weishapl da1ebb0a67
Use `LintingIssue`s instead of `FatalError`s for signing issues (#2919)
* use `LintingIssue`s instead of `FatalError`s when signing issues occur

* revert SPM changes

* revert unintentional changes

* delete unused code

* adapt issue reason

* make sure provisioning profile is installed even when expired

* update changelog
2021-05-13 15:06:45 +02:00
Luis Padron ae9525f361 Add --build-output-path argument to 'tuist build' 2021-05-07 09:20:32 -04:00
Giovanni Filaferro 079b9efbe2
[Fix] Resources Synthetization Tweaks (#2887) 2021-05-07 08:44:34 +02:00
Jared Sorge a8f79878f0 Suppress the warning if the target has actions too 2021-05-03 09:36:55 -07:00
Jared Sorge ab062ff257 Format sources 2021-05-03 09:36:55 -07:00
Jared Sorge e825be55fd Suppress "no sources" warning when the target has dependencies 2021-05-03 09:36:12 -07:00
Kamil Harasimowicz 8a926b236c
[Dependencies.swift] Implement `tuist dependencies update` command. (#2819) 2021-05-03 13:33:14 +02:00
apps4everyone 6c87199a1f
Add support for `runForInstallBuildsOnly` (runOnlyForDeploymentPostprocessing) for build actions. (#2823)
- Added a `runForInstallBuildsOnly` property on `TargetAction` which enables the "For install builds only" check box on the generated script build phase 
- `ios_app_with_actions` fixture has been updated to demo the new option
2021-05-02 09:04:36 +01:00
Luis Padron 4cda29b0f0 Remove pruned targets from codeCoverageTargets 2021-04-29 21:20:53 -04:00
Pedro Piñera Buendía 2f8f66b238
Merge branch 'main' into test-project-regeneration 2021-04-28 18:23:03 +02:00
Giovanni Filaferro 8bdd99a29c
[Fix] Resources Targets should inherit their parents Deployment Version (#2830)
* fix: let deployment target be inherited from parent to resources module

* fix: update changelog

* fix: add tests checks
2021-04-28 18:21:11 +02:00
ferologics aa7451cff6 🗑 Remove 'CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER' key 2021-04-28 16:20:04 +02:00
ferologics 69dc21ddb3 🛠 Fix the failing DefaultSettingsProviderTests 2021-04-28 12:12:07 +02:00
Kas 323575b971
Fix messagesExtension default settings (#2824) 2021-04-28 07:28:04 +02:00
Alfredo Delli Bovi e67742c5b0
Optimize framework metadata reading (#2814) 2021-04-20 07:09:39 +02:00
Alfredo Delli Bovi 3117deeb0d
Add support for specifying cache directory (#2566) 2021-04-18 17:43:34 +02:00
Kamil Harasimowicz 9140b8803e
Make `ValueGraph` serializable. (#2811)
* [codable-graph] change - make `ValueGraph` serializable (`Codable`)

* [codable-graph] remove - `TuistGraphTests` empty file

* [codable-graph] add - unit tests

* [codable-graph] change - make `ResourceSynthesizer` `Codable`

* [codable-graph] fix - `./fourier format swift --fix`

* [codable-graph] change - update changelog

* [codable-graph] remove -  not needed comments

* [codable-graph] change - use `decodeIfPresent` for `optional` properties

* [codable-graph] change - use `encodeIfPresent` for `optional` properties

* [codable-graph] change - make `CodingKeys` as `private`

* [codable-graph] fix - `./fourier format swift --fix`
2021-04-16 09:08:12 +02:00
Marek Fořt 0b47cc400d
Resource synthesizer plugin (#2746)
* Fix unit tests

* Run default resource synthesizer

* Add synthesizer plugin

* Integrate resource synthesizer plugin

* Allow custom initializer

* WIP: Resource synthesizer path

* Load plugin template during mapping

* Add missing parsers

* Add tests

* Add documentation

* Run swiftformat

* Include stencil plugin files in tuist edit

* Address review comments

* Fix tests

* Fix usage of assets

* Move ResourceSynthesizers documentation to new location

* Add Project documentation

* Refactor to use convention for local template files

* Rename ResourceTemplates dir to ResourceSynthesizers

* Fix resources link

* Rename ResourceSynthesizerPlugin to PluginResourceSynthesizer

* Edit CHANGELOG

* Fix build issues

* Format code

* Fix broken link
2021-04-13 19:46:24 +02:00
Kas 45b25b064c
Remove unused `GeneratorModelLoading` protocol (#2798) 2021-04-12 16:40:08 +02:00
Kamil Harasimowicz 19378bb4b6
[Chimera] Fetching SPM dependencies. (#2394) 2021-04-10 21:04:17 +02:00
Jake Adams 8b34cac706
Update associated test target logic in the default auto generated schemes (#2797)
Resolves https://github.com/tuist/tuist/issues/2796

- Updated the logic for finding potential associated test targets for a given target when auto generating the default set of schemes such that it caters for more use cases
- The test targets are now included if they have they follow the pattern `<TargetName>*Tests` (i.e. prefixed with the target name and suffixed with `Tests`)
2021-04-09 18:17:41 +01:00
Franz Busch 38e41607d4
Support SourceFileLists in TargetActions (#2686) 2021-04-09 10:57:19 +02:00
David Cortés ccd532cd8d
Run all unit tests (Fixed Lint) (#2740)
* Run all unit tests

* Fix unit tests

* Edit CHANGELOG

* corrected fourier lint failing

Co-authored-by: fortmarek <marekfort@me.com>
Co-authored-by: David Cortés <david.cortes@free-now.com>
2021-03-29 13:10:17 +02:00
Pedro Piñera Buendía dc1f831b93
Fix Homebrew runs on M1 (#2711)
* Fix Homebrew runs in M1

* Fix ruby too
2021-03-26 16:17:34 +01:00
Kas 84dcf5ef94
Fix false positive duplicate bundle id lint warning (#2707)
* Fix false positive duplicate bundle id lint warning

- In the event a bundle ID is in the form of `prefix.${VARIABLE}` (e.g. `com.mydomain.${PRODUCT_NAME:rfc1034identifier}`) which can safely be shared between multiple target a lint warning is produced indicating there are duplicate bundle ids
- There was an existing check to exclude checking variables, however it only worked if the entire bundle ID was a variable (e.g. `${variable}`) and didn't take into account prefixes / suffixes
- To address this the variable check is being simplified to check for the existence of a `$` rather than use a regex

Test Plan:

- Verify unit tests pass

* Update changelog
2021-03-26 11:48:42 +01:00
Marek Fořt 5dcb2d7170
Add SRCROOT for Info.plist only when necessary (#2706) 2021-03-26 08:25:34 +01:00