0

In our app we are using cocoapods to keep our config file in a private repo and access the file in build phase like this

CONFIG_FILE="${PODS_ROOT}/My-Repo-Name/swiftlint.yml"
"${PODS_ROOT}/SwiftLint/swiftlint" --config $CONFIG_FILE

Now we are thinking of moving the config file to a swift package, can anyone help to determine how to give a path to the config file in the swift package?

Alejandro Vargas
  • 1,327
  • 12
  • 26

2 Answers2

1

Bit of a hack, but you might be able to use:

CONFIG_FILE="${BUILD_DIR}/../../SourcePackages/checkouts/My-Repo-Name/swiftlint.yml"
dalton_c
  • 6,876
  • 1
  • 33
  • 42
0

The above answer didn't work but this did

CONFIG_FILE="${BUILD_DIR%Build/*}SourcePackages/checkouts/<repo-name>/Sources/swiftlint.yml"
Alejandro Vargas
  • 1,327
  • 12
  • 26