Skip to content

Commit

Permalink
Merge pull request #62 from rockbruno/fix-pr
Browse files Browse the repository at this point in the history
Fix danger-swiftinfo + Xcode 12.3
  • Loading branch information
rockbruno authored Feb 6, 2021
2 parents 8cfd1ff + cc211f5 commit 94ecd1a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
- name: Build
run: make build
env:
DEVELOPER_DIR: /Applications/Xcode_12.2.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_12.3.app/Contents/Developer
- name: Run tests
run: swift test
- name: Check the example project
run: cd ./ExampleProject && make swiftinfo
env:
DEVELOPER_DIR: /Applications/Xcode_12.2.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_12.3.app/Contents/Developer
- name: Package
run: make package
2 changes: 2 additions & 0 deletions ExampleProject/Infofile.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ api.print(output: output)

if ProcessInfo.processInfo.arguments.contains("--myCustomArgument") {
print("Yay, custom arguments!")
} else {
preconditionFailure("The custom arguments test didn't work.")
}

api.save(output: output)
5 changes: 3 additions & 2 deletions Sources/SwiftInfo/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct Swiftinfo: ParsableCommand {
Swiftinfo.exit()
}

setupLogConfig()
setupConfig()

let fileUtils = FileUtils()
let toolchainPath = getToolchainPath()
Expand Down Expand Up @@ -78,10 +78,11 @@ struct Swiftinfo: ParsableCommand {
return oneLined + "/Toolchains/XcodeDefault.xctoolchain/usr/lib/sourcekitd.framework/sourcekitd"
}

private func setupLogConfig() {
private func setupConfig() {
isInVerboseMode = verbose
isInSilentMode = silent
printSourceKitQueries = printSourcekit
isInPullRequestMode = ProcessInfo.processInfo.arguments.contains("--pullRequest")
}
}

Expand Down

0 comments on commit 94ecd1a

Please sign in to comment.