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

Support cwd parameter #333

Merged
merged 9 commits into from
Apr 3, 2020
Merged

Support cwd parameter #333

merged 9 commits into from
Apr 3, 2020

Conversation

f-meloni
Copy link
Member

@f-meloni f-meloni commented Apr 1, 2020

Many people prefers using the SPM Danger configuration, because is more performing.
Having a Package.swift on your root folder can be annoying, especially now that Xcode (from 11) doesn't put on the recents list an xcproj (or xcworkspace) when there is a Package.swift in the same folder.
At the moment if you move the Package.swift in another folder Danger breaks because the path are relatives to the root folder.
Of course the paths can be changed on the Dangerfile in order to have .. or the full path, but this would not work for example for Plugins where the path is automatically taken from Danger's modified files.
This is why I thought would be nice to offer a current work directory option to make you run danger like it was in the root folder of your project even if you have it somewhere else.
I can also think this could be useful in cases like https://github.com/WeTransfer/WeTransfer-iOS-CI/tree/master/Danger-Swift where you have your CI configuration in a separated repo.

PS. this change to work requires the changes on danger/danger-js#1021
@orta can you please release a new danger-js version?

@danger-public
Copy link

danger-public commented Apr 1, 2020

Warnings
⚠️

Sources/RunnerLib/SPMDanger.swift#L53 - Don't add a space between the method name and the parentheses. (no_space_in_method_call)

Generated by 🚫 Danger Swift against 139adcc

@orta
Copy link
Member

orta commented Apr 2, 2020

Looks good overall, but it's not a feature unless it's documented ;)

@f-meloni f-meloni merged commit 9caa7d5 into master Apr 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants