Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: [<bump type>] (<type>): <description>"
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
Expand Down
Original file line number Diff line number Diff line change
@@ -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] = [],
Expand All @@ -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:
Expand Down Expand Up @@ -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 {
Expand All @@ -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)
}
}
10 changes: 10 additions & 0 deletions Sources/ProjectDescription/WorkspaceGenerationOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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] = [],
Expand Down Expand Up @@ -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(
Expand Down
Loading