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

SwiftPlugins setup doesn't work when specifying "clonedSourcePackagesDirPath" in xcodebuild #5821

Open
grzegorzkrukowski opened this issue Oct 8, 2024 · 1 comment
Labels
documentation Issues related to documentation, either from the tooling side or content-wise. good first issue Issue to be taken up by new contributors yet unfamiliar with the project.

Comments

@grzegorzkrukowski
Copy link

grzegorzkrukowski commented Oct 8, 2024

New Issue Checklist

Bug Description

The setup mentioned in the docs for SwiftPlugin doesn't work when executed with clonedSourcePackagesDirPath:
xcodebuild -clonedSourcePackagesDirPath ".build"

SWIFT_PACKAGE_DIR="${BUILD_DIR%Build/*}SourcePackages/artifacts"
SWIFTLINT_CMD=$(ls "$SWIFT_PACKAGE_DIR"/swiftlintplugins/SwiftLintBinary/SwiftLintBinary.artifactbundle/swiftlint-*/bin/swiftlint | head -n 1)

if test -f "$SWIFTLINT_CMD" 2>&1
then
    "$SWIFTLINT_CMD"
else
    echo "warning: `swiftlint` command not found - See https://github.com/realm/SwiftLint#installation for installation instructions."
fi

Packages are then stored in a that folder, not the %BUILD_DIR.

Environment

  • SwiftLint version: any
  • Xcode version: 15.0, 16.0
  • Installation method used: SwiftLintPlugins
@SimplyDanny SimplyDanny added the documentation Issues related to documentation, either from the tooling side or content-wise. label Oct 11, 2024
@SimplyDanny
Copy link
Collaborator

SimplyDanny commented Oct 11, 2024

There seems to be no variable in Xcode that points to the alternative package directory. In this case, the only thing that can be done is to update the README mentioning that this only works with the default package location.

Or have you found a solution, @grzegorzkrukowski?

@SimplyDanny SimplyDanny added the good first issue Issue to be taken up by new contributors yet unfamiliar with the project. label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issues related to documentation, either from the tooling side or content-wise. good first issue Issue to be taken up by new contributors yet unfamiliar with the project.
Projects
None yet
Development

No branches or pull requests

2 participants