Skip to content

Commit

Permalink
Fix building with swift build -c release (realm#4563)
Browse files Browse the repository at this point in the history
Which previously tried to build the SwiftLintTestHelpers module,
which is a test-only module.

This should fix building with precommit and Mint, both of which assume
you can build the CLI targets in a Swift package with the
`swift build -c release` command.
  • Loading branch information
jpsim authored Nov 20, 2022
1 parent 85e59c7 commit 4408250
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
## Main

#### Breaking

* None.

#### Experimental

* None.

#### Enhancements

* None.

#### Bug Fixes

* Fix building with `swift build -c release`.
[JP Simard](https://github.com/jpsim)
[#4559](https://github.com/realm/SwiftLint/issues/4559)
[#4560](https://github.com/realm/SwiftLint/issues/4560)

## 0.50.0: Artisanal Clothes Pegs

#### Breaking
Expand Down
5 changes: 2 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,11 @@ let package = Package(
name: "SwiftLintFramework",
dependencies: frameworkDependencies
),
.target(
.testTarget(
name: "SwiftLintTestHelpers",
dependencies: [
"SwiftLintFramework"
],
path: "Tests/SwiftLintTestHelpers"
]
),
.testTarget(
name: "SwiftLintFrameworkTests",
Expand Down
2 changes: 1 addition & 1 deletion tools/test-analyze.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ readonly swiftlint="$RUNFILES_DIR/SwiftLint/swiftlint"
readonly swiftpm_yaml="$RUNFILES_DIR/SwiftLint/swiftpm.yaml"
# Change to workspace directory
cd "$(dirname "$(readlink Package.swift)")"
swift build
swift build --build-tests
"$swiftlint" analyze --strict --compile-commands ".build/debug.yaml"

0 comments on commit 4408250

Please sign in to comment.