-
Notifications
You must be signed in to change notification settings - Fork 15
Update README based on errors found on working with Xcode 11.4.x+/Swift 5.2 and CI #21
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,11 @@ You can use a "full SPM" solution to install both `danger-swift` and `DangerXCod | |
- Add to your `Package.swift`: | ||
|
||
```swift | ||
// swift-tools-version:5.2 | ||
// The swift-tools-version declares the minimum version of Swift required to build this package. | ||
|
||
import PackageDescription | ||
|
||
let package = Package( | ||
... | ||
products: [ | ||
|
@@ -26,12 +31,14 @@ let package = Package( | |
], | ||
dependencies: [ | ||
... | ||
// Danger | ||
.package(name: "danger-swift", url: "https://github.com/danger/swift.git", from: "3.0.0"), // dev | ||
// Danger Plugins | ||
.package(url: "https://github.com/f-meloni/danger-swift-xcodesummary", from: "0.1.0") // dev | ||
.package(name: "DangerXCodeSummary", url: "https://github.com/f-meloni/danger-swift-xcodesummary", from: "1.2.1"), // dev | ||
... | ||
], | ||
targets: [ | ||
.target(name: "DangerDependencies", dependencies: ["Danger", "DangerXCodeSummary"]), // dev | ||
.target(name: "DangerDependencies", dependencies: ["danger-swift", "DangerXCodeSummary"]) // dev | ||
... | ||
] | ||
) | ||
|
@@ -65,7 +72,12 @@ DangerXCodeSummary can be used with SPM (this repo uses it on the Linux CI), but | |
To generate the report run: | ||
|
||
```bash | ||
swift test | XCPRETTY_JSON_FILE_OUTPUT=result.json xcpretty -f `xcpretty-json-formatter` | ||
swift test 2>&1 | XCPRETTY_JSON_FILE_OUTPUT=xcpretty_xcode_summary.json xcpretty -f `xcpretty-json-formatter` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
2<&1 | ||
|
||
[...] | ||
|
||
swift run danger-swift ci --fail-on-errors=true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The correct call should be
Also I'm not sure everyone wants that behaviour, it depends if you want or not your CI to continue after danger runs, Danger already updates the state of the PR, then it really depends on your workflow if it should or not fail the build |
||
``` | ||
|
||
## Send report to Danger | ||
|
@@ -104,4 +116,4 @@ let summary = XCodeSummary(json: JSONFile.jsonObject(fromString: warningsJSON), | |
return !file.contains("Sources/DangerXCodeSummary/") | ||
}) | ||
summary.report() | ||
``` | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that could potentially remove some optimisations SPM would do here, given you only need the
Danger
library as dependency not the whole danger-swift, you don't need to build it all, then I would probably remove all thename: "
change, at least for thedanger-swift
part.