lytics / ios-sdk

MIT License
0 stars 0 forks source link

Make Plugin Dependency Conditional #115

Closed mgacy closed 1 year ago

mgacy commented 1 year ago

Uses an environment variable to conditionally declare a VersionFilePlugin dependency.

The release workflow sets an environment variable before invoking the package plugin. The package manifest checks if there is a value for LYTICS_SWIFT_CI and if it is BUILDING_FOR_RELEASE, adds an additional package dependency. The expectation is that this can be expanded to support a conditional dependency on the Swift-DocC Plugin plugin as part of a documentation workflow, for example.

The Release workflow was also updated to reset changes to Package.resolved before creating a PR.

Finally, this fixes an issue where the VersionFilePlugin fails due to a failure to specify the target (now that there are two)