diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 08adaf9..5a56143 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -22,10 +22,10 @@ jobs: fetch-depth: 0 - name: Validate Title run: | - REGEX="^\[(patch|minor|major)\] (feat|fix|refactor): .+$" + REGEX="^\[(none|patch|minor|major)\] .+$" if [[ ! $INPUT_TITLE =~ $REGEX ]]; then echo "::error title=PR Title::Your pull request title does not follow the conventional commit format. Please use the format: [] (): " - echo "::warning title=Available Types:feat,fix,refactor" + echo "::warning title=Example Types:feat,fix,refactor,doc" echo "::warning title=Example:[patch] refactor: Refactor mappers" echo "::warning Your title $INPUT_TITLE" exit 1 diff --git a/Sources/ProjectDescription/Dependencies/CocoapodsDependencies.swift b/Sources/ProjectDescription/Dependencies/CocoapodsDependencies.swift index fd82baa..7bf965e 100644 --- a/Sources/ProjectDescription/Dependencies/CocoapodsDependencies.swift +++ b/Sources/ProjectDescription/Dependencies/CocoapodsDependencies.swift @@ -1,13 +1,42 @@ import Foundation +/// A collection of external cocoapods dependencies public struct CocoapodsDependencies: Codable, Equatable { + /// Collection of cocoapods CDN specs repositories + /// + /// Repositories at the top have more priority when searching podspecs. + /// CDN specs repositories are always have more priority than Git specs repositories. public var repos: [String] + /// Collection of cocoapods Git specs repositories + /// + /// Repositories at the top have more priority when searching podspecs. + /// CDN specs repositories are always have more priority than Git specs repositories. public var gitRepos: [String] + /// List of external dependencies public var dependencies: [Dependency] + /// List of local podspecs, that need to participate in dependency resolution. + /// + /// This may be the case when external module depends on local one. + /// Key is source_root path, value is an array of globs to podspec files. public var localPodspecs: [FilePath: [FilePath]]? + /// Default linkage type for all cocoapods dependencies + /// + /// When specified, changes linkage type for all cocoapods dependencies, + /// unless specified in `forceLinking` public var defaultForceLinking: Linking? + /// Linkage type for specific cocoapods dependencies + /// + /// Key - name of dependency, value - linkage public var forceLinking: [String: Linking]? + /// Creates a new `CocoapodsDependencies` instance. + /// - Parameters + /// - repos: Collection of CDN repositories + /// - gitRepos: Collection of Git repositories + /// - dependencies: External dependencies + /// - localPodspecs: List of local podspecs that need to participate in dependency resolution. This may be the case when external module depends on local one. + /// - defaultForceLinking: Default linkage type for all cocoapods dependencies + /// - forceLinking: Linkage type for specific cocoapods dependencies public init( repos: [String], gitRepos: [String] = [], @@ -31,12 +60,14 @@ public struct CocoapodsDependencies: Codable, Equatable { extension CocoapodsDependencies { @frozen + /// Linkage type of cocoapods dependencies public enum Linking: Equatable, Codable { case `static` case dynamic } @frozen + /// Dependency type of external cocoapods module public enum Dependency: Codable, Hashable, Comparable { /// Dependency from CDN repository. /// - Parameters: @@ -81,9 +112,13 @@ extension CocoapodsDependencies { } @frozen + /// Git ref of external repository public enum GitRef: Codable, Equatable, Hashable, Comparable, CustomStringConvertible { + /// Branch name of external repository case branch(String) + /// Tag name of external repository case tag(String) + /// Commit sha of external repository case commit(String) public var description: String { @@ -99,10 +134,19 @@ extension CocoapodsDependencies { } @frozen + /// Version constraint of external cocoapods dependency public enum Requirement: Codable, Hashable { + /// Exact version case exact(String) + /// Specified version or a newer one case atLeast(String) + /// Specified version or a newer one up to next major + /// + /// For example, `.upToNextMajor("1.2.3")` is equivalent to range `>= 1.2.3 < 2.0.0` case upToNextMajor(String) + /// Specified version or a newer one up to next minor + /// + /// For example, `.upToNextMinor("1.2.3")` is equivalent to range `>= 1.2.3 < 1.3.0` case upToNextMinor(String) } } diff --git a/Sources/ProjectDescription/WorkspaceGenerationOptions.swift b/Sources/ProjectDescription/WorkspaceGenerationOptions.swift index 9c9758b..d7aa65a 100644 --- a/Sources/ProjectDescription/WorkspaceGenerationOptions.swift +++ b/Sources/ProjectDescription/WorkspaceGenerationOptions.swift @@ -6,9 +6,17 @@ public struct CommonSettings: Codable, Equatable, ExpressibleByDictionaryLiteral public let settings: [String: SettingValue] /// Regular expression which describes which targets settings need to be applied to. public let targetRegexp: String? + /// Regular expression which describes which targets need to be excluded from applying settings. public let exceptRegexp: String? + /// List of configuration names to apply settings to. public let configurations: [String] + /// Creates a new `CommonSettings` instance. + /// - Parameters: + /// - settings: settings that need to be applied + /// - configurations: list of configuration names + /// - targetRegexp: regular expression that will be mathched against target names + /// - exceptRegexp: regular expression exceptions that will be mathched against target names public init( settings: [String: SettingValue], configurations: [String] = [], @@ -107,8 +115,10 @@ extension Workspace { /// Allow to autogenerate local podsschemes public var autogenerateLocalPodsSchemes: AutogenerateLocalPodsSchemes + /// Applies settings across several projects public let commonSettings: [CommonSettings] + /// Creates configurations for all projects public var configurations: [String: BuildConfiguration.Variant] public init(