Rename project
This commit is contained in:
parent
c6ce6e084f
commit
c416b70e45
|
@ -15,7 +15,7 @@ jobs:
|
|||
swift package generate-xcodeproj
|
||||
- run:
|
||||
name: Run tests
|
||||
command: xcodebuild test -scheme xpm-Package -enableCodeCoverage YES
|
||||
command: xcodebuild test -scheme tuist-Package -enableCodeCoverage YES
|
||||
- run:
|
||||
name: Send test coverage report
|
||||
command: bash <(curl -s https://codecov.io/bash)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Resolves https://github.com/tuist/xpm/issues/YYY
|
||||
Resolves https://github.com/tuist/tuist/issues/YYY
|
||||
|
||||
### Short description 📝
|
||||
|
||||
|
|
|
@ -86,17 +86,13 @@ fastlane/test_output
|
|||
|
||||
# End of https://www.gitignore.io/api/swift,macos
|
||||
|
||||
xpm.xcodeproj
|
||||
*.xcodeproj
|
||||
.byebug_history
|
||||
*.xcarchive
|
||||
tmp/
|
||||
build/
|
||||
|
||||
.env
|
||||
keys/dsa_priv.pem
|
||||
certs/dist.cer
|
||||
certs/dist.p12
|
||||
certs/xpm_dist.provisionprofile
|
||||
.idea/
|
||||
Carthage/Checkouts
|
||||
*.profraw
|
|
@ -1,5 +1,5 @@
|
|||
author: Tuist
|
||||
github_url: https://github.com/tuist/xpm
|
||||
github_url: https://github.com/tuist/tuist
|
||||
copyright: 'Copyright © from 2018 Pedro Piñera Buendía. All rights reserved.'
|
||||
output: docs
|
||||
module: ProjectDescription
|
||||
|
@ -7,9 +7,9 @@ clean: true
|
|||
documentation: guides/**/*
|
||||
xcodebuild_arguments:
|
||||
- -project
|
||||
- xpm.xcodeproj
|
||||
- tuist.xcodeproj
|
||||
- -scheme
|
||||
- xpm-Package
|
||||
- tuist-Package
|
||||
swift_version: "4.1.2"
|
||||
min_acl: public
|
||||
readme: README.md
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
included:
|
||||
- App/xpmKit/Sources
|
||||
- App/Sources
|
||||
excluded:
|
||||
- Sources
|
||||
excluded:
|
||||
- Tests
|
||||
- .build
|
||||
disabled_rules:
|
||||
|
|
12
CHANGELOG.md
12
CHANGELOG.md
|
@ -6,15 +6,15 @@ Please, check out guidelines: https://keepachangelog.com/en/1.0.0/
|
|||
|
||||
### Added
|
||||
|
||||
- Platform, product, path and name arguments to the init command https://github.com/tuist/xpm/pull/64 by @pepibumur.
|
||||
- Lint that `Info.plist` and `.entitlements` files are not copied into the target products https://github.com/tuist/xpm/pull/65 by @pepibumur
|
||||
- Lint that there's only one resources build phase https://github.com/tuist/xpm/pull/65 by @pepibumur.
|
||||
- Platform, product, path and name arguments to the init command https://github.com/tuist/tuist/pull/64 by @pepibumur.
|
||||
- Lint that `Info.plist` and `.entitlements` files are not copied into the target products https://github.com/tuist/tuist/pull/65 by @pepibumur
|
||||
- Lint that there's only one resources build phase https://github.com/tuist/tuist/pull/65 by @pepibumur.
|
||||
|
||||
### Added
|
||||
|
||||
- Sources, resources, headers and coreDataModels property to the `Target` model https://github.com/tuist/xpm/pull/67 by @pepibumur.
|
||||
- Sources, resources, headers and coreDataModels property to the `Target` model https://github.com/tuist/tuist/pull/67 by @pepibumur.
|
||||
|
||||
### Removed
|
||||
|
||||
- The scheme attribute from the `Project` model https://github.com/tuist/xpm/pull/67 by @pepibumur.
|
||||
- Build phases and build files https://github.com/tuist/xpm/pull/67 by @pepibumur.
|
||||
- The scheme attribute from the `Project` model https://github.com/tuist/tuist/pull/67 by @pepibumur.
|
||||
- Build phases and build files https://github.com/tuist/tuist/pull/67 by @pepibumur.
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "xpm",
|
||||
name: "tuist",
|
||||
products: [
|
||||
.executable(name: "xpm", targets: ["xpm"]),
|
||||
.executable(name: "xpmembed", targets: ["xpmembed"]),
|
||||
.executable(name: "xpmenv", targets: ["xpmenv"]),
|
||||
.executable(name: "tuist", targets: ["tuist"]),
|
||||
.executable(name: "tuist-embed", targets: ["tuist-embed"]),
|
||||
.executable(name: "tuistenv", targets: ["tuistenv"]),
|
||||
.library(name: "ProjectDescription",
|
||||
type: .dynamic,
|
||||
targets: ["ProjectDescription"]),
|
||||
|
@ -18,35 +18,35 @@ let package = Package(
|
|||
],
|
||||
targets: [
|
||||
.target(
|
||||
name: "xpmcore",
|
||||
name: "TuistCore",
|
||||
dependencies: ["Utility"]),
|
||||
.target(
|
||||
name: "xpmcoreTesting",
|
||||
dependencies: ["xpmcore"]),
|
||||
name: "TuistCoreTesting",
|
||||
dependencies: ["TuistCore"]),
|
||||
.testTarget(
|
||||
name: "xpmcoreTests",
|
||||
dependencies: ["xpmcore", "xpmcoreTesting"]),
|
||||
name: "TuistCoreTests",
|
||||
dependencies: ["TuistCore", "TuistCoreTesting"]),
|
||||
.target(
|
||||
name: "xpmkit",
|
||||
dependencies: ["xcodeproj", "Utility", "xpmcore"]),
|
||||
name: "TuistKit",
|
||||
dependencies: ["xcodeproj", "Utility", "TuistCore"]),
|
||||
.testTarget(
|
||||
name: "xpmkitTests",
|
||||
dependencies: ["xpmkit", "xpmcoreTesting"]),
|
||||
name: "TuistKitTests",
|
||||
dependencies: ["TuistKit", "TuistCoreTesting"]),
|
||||
.target(
|
||||
name: "xpm",
|
||||
dependencies: ["xpmkit"]),
|
||||
name: "tuist",
|
||||
dependencies: ["TuistKit"]),
|
||||
.target(
|
||||
name: "xpmembed",
|
||||
dependencies: ["xpmkit"]),
|
||||
name: "tuist-embed",
|
||||
dependencies: ["TuistKit"]),
|
||||
.target(
|
||||
name: "xpmenvkit",
|
||||
dependencies: ["Utility", "xpmcore"]),
|
||||
name: "TuistEnvKit",
|
||||
dependencies: ["Utility", "TuistCore"]),
|
||||
.testTarget(
|
||||
name: "xpmenvkitTests",
|
||||
dependencies: ["xpmenvkit", "xpmcoreTesting"]),
|
||||
name: "TuistEnvKitTests",
|
||||
dependencies: ["TuistEnvKit", "TuistCoreTesting"]),
|
||||
.target(
|
||||
name: "xpmenv",
|
||||
dependencies: ["xpmenvkit"]),
|
||||
name: "tuistenv",
|
||||
dependencies: ["TuistEnvKit"]),
|
||||
.target(
|
||||
name: "ProjectDescription",
|
||||
dependencies: []),
|
||||
|
@ -55,7 +55,7 @@ let package = Package(
|
|||
dependencies: ["ProjectDescription"]),
|
||||
.testTarget(
|
||||
name: "IntegrationTests",
|
||||
dependencies: ["xpmkit", "Utility"]
|
||||
dependencies: ["TuistKit", "Utility"]
|
||||
),
|
||||
]
|
||||
)
|
||||
|
|
|
@ -20,5 +20,5 @@
|
|||
|
||||
1. Git clone: `git@github.com:tuist/tuist.git`
|
||||
2. Generate Xcode project with `swift package generate-xcodeproj`.
|
||||
3. Open `xpm.xcodeproj`.
|
||||
3. Open `tuist.xcodeproj`.
|
||||
4. Have fun 🤖
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Release
|
||||
|
||||
This document describes the process of releasing new versions of xpm.
|
||||
This document describes the process of releasing new versions of tuist.
|
||||
|
||||
1. First make sure you are in master and the latest changes are pulled: `git pull origin master`
|
||||
2. Ensure that the project is in a releaseable state by running the tests: `swift test`.
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import Foundation
|
||||
|
||||
public class Constants {
|
||||
public static let versionFileName = ".xpm-version"
|
||||
public static let binFolderName = ".xpm-bin"
|
||||
public static let versionFileName = ".tuist-version"
|
||||
public static let binFolderName = ".tuist-bin"
|
||||
public static let gitRepositorySSH = "git@github.com:tuist/tuist.git"
|
||||
public static let version = "0.1.0"
|
||||
public static let swiftVersion = "4.1.2"
|
|
@ -1,6 +1,6 @@
|
|||
import Foundation
|
||||
import Utility
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
public final class MockCommand: Command {
|
||||
public static let command: String = "command"
|
|
@ -1,6 +1,6 @@
|
|||
import Foundation
|
||||
import XCTest
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
public final class MockErrorHandler: ErrorHandling {
|
||||
public var fatalErrorArgs: [FatalError] = []
|
|
@ -1,5 +1,5 @@
|
|||
import Foundation
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
public final class MockFatalError: FatalError {
|
||||
public let type: ErrorType
|
|
@ -1,6 +1,6 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
public final class MockFileHandler: FileHandling {
|
||||
private let fileHandler: FileHandling
|
|
@ -1,5 +1,5 @@
|
|||
import Foundation
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
public class MockLogger: Logging {
|
||||
public var logCount: UInt = 0
|
|
@ -1,5 +1,5 @@
|
|||
import Foundation
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
public final class MockPrinter: Printing {
|
||||
public var printArgs: [String] = []
|
|
@ -1,5 +1,5 @@
|
|||
import Foundation
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
public class MockShell: Shelling {
|
||||
public var runStub: (([String], [String: String]) throws -> Void)?
|
|
@ -1,11 +1,11 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import Utility
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
/// Error thrown by the BundleCommand
|
||||
///
|
||||
/// - missingVersionFile: Thrown when the developer runs the command in a directory where there isn't a .xpm-version file.
|
||||
/// - missingVersionFile: Thrown when the developer runs the command in a directory where there isn't a .tuist-version file.
|
||||
enum BundleCommandError: FatalError, Equatable {
|
||||
case missingVersionFile(AbsolutePath)
|
||||
|
||||
|
@ -19,7 +19,7 @@ enum BundleCommandError: FatalError, Equatable {
|
|||
var description: String {
|
||||
switch self {
|
||||
case let .missingVersionFile(path):
|
||||
return "Couldn't find a .xpm-version file in the directory \(path.asString)."
|
||||
return "Couldn't find a .tuist-version file in the directory \(path.asString)."
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -31,13 +31,13 @@ enum BundleCommandError: FatalError, Equatable {
|
|||
}
|
||||
}
|
||||
|
||||
/// Command that bundles the xpm binary in a .xpm-bin in the current directory.
|
||||
/// Command that bundles the tuist binary in a .tuist-bin in the current directory.
|
||||
final class BundleCommand: Command {
|
||||
/// Command name.
|
||||
static var command: String = "bundle"
|
||||
|
||||
/// Command overview.
|
||||
static var overview: String = "Bundles the version specified in the .xpm-version file into the .xpm-bin directory."
|
||||
static var overview: String = "Bundles the version specified in the .tuist-version file into the .tuist-bin directory."
|
||||
|
||||
/// Versions controller.
|
||||
private let versionsController: VersionsControlling
|
||||
|
@ -111,6 +111,6 @@ final class BundleCommand: Command {
|
|||
}
|
||||
try fileHandler.copy(from: versionPath, to: binFolderPath)
|
||||
|
||||
printer.print(success: "xpm bundled successfully at \(binFolderPath.asString).")
|
||||
printer.print(success: "tuist bundled successfully at \(binFolderPath.asString).")
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import Utility
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
public final class CommandRegistry {
|
||||
|
||||
|
@ -39,9 +39,9 @@ public final class CommandRegistry {
|
|||
errorHandler: ErrorHandling = ErrorHandler(),
|
||||
commandRunner: CommandRunning = CommandRunner(),
|
||||
commands: [Command.Type] = []) {
|
||||
parser = ArgumentParser(commandName: "xpm",
|
||||
parser = ArgumentParser(commandName: "tuist",
|
||||
usage: "<command> <options>",
|
||||
overview: "Manage the environment xpm versions.",
|
||||
overview: "Manage the environment tuist versions.",
|
||||
seeAlso: "http://docs.xcodepm.com/")
|
||||
self.processArguments = processArguments
|
||||
self.errorHandler = errorHandler
|
||||
|
@ -65,10 +65,10 @@ public final class CommandRegistry {
|
|||
}
|
||||
|
||||
/// Parses the process arguments and returns the result if the command
|
||||
/// is a valid xpmenv command. Otherwise, it returns nil, meaning that
|
||||
/// the command should be proxied to xpm.
|
||||
/// is a valid tuistenv command. Otherwise, it returns nil, meaning that
|
||||
/// the command should be proxied to tuist.
|
||||
///
|
||||
/// - Returns: parsing result if the command is a xpmenv command.
|
||||
/// - Returns: parsing result if the command is a tuistenv command.
|
||||
/// - Throws: an error if the command parsing fails (e.g. wrong arguments).
|
||||
private func parse() throws -> ArgumentParser.Result? {
|
||||
let arguments = Array(processArguments().dropFirst())
|
|
@ -1,5 +1,5 @@
|
|||
import Foundation
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
protocol CommandRunning: AnyObject {
|
||||
func run() throws
|
|
@ -1,14 +1,14 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import Utility
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
class LocalCommand: Command {
|
||||
/// Command name.
|
||||
static var command: String = "local"
|
||||
|
||||
/// Command overview
|
||||
static var overview: String = "Creates a .xpm-version file to pin the xpm version that should be used in the current directory."
|
||||
static var overview: String = "Creates a .tuist-version file to pin the tuist version that should be used in the current directory."
|
||||
|
||||
/// Version argument.
|
||||
let versionArgument: PositionalArgument<String>
|
||||
|
@ -54,10 +54,10 @@ class LocalCommand: Command {
|
|||
let version = result.get(versionArgument)!
|
||||
let currentPath = fileHandler.currentPath
|
||||
printer.print(section: "Generating \(Constants.versionFileName) file with version \(version).")
|
||||
let xpmVersionPath = currentPath.appending(component: Constants.versionFileName)
|
||||
try "\(version)".write(to: URL(fileURLWithPath: xpmVersionPath.asString),
|
||||
let tuistVersionPath = currentPath.appending(component: Constants.versionFileName)
|
||||
try "\(version)".write(to: URL(fileURLWithPath: tuistVersionPath.asString),
|
||||
atomically: true,
|
||||
encoding: .utf8)
|
||||
printer.print(success: "File generated at path \(xpmVersionPath.asString).")
|
||||
printer.print(success: "File generated at path \(tuistVersionPath.asString).")
|
||||
}
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import Utility
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
enum XpmEnvError: FatalError {
|
||||
enum tuistEnvError: FatalError {
|
||||
case noVersionAvailable
|
||||
case pathNotFound(Version)
|
||||
|
||||
|
@ -17,14 +17,14 @@ enum XpmEnvError: FatalError {
|
|||
var description: String {
|
||||
switch self {
|
||||
case .noVersionAvailable:
|
||||
return "Couldn't find any local xpm version available."
|
||||
return "Couldn't find any local tuist version available."
|
||||
case let .pathNotFound(version):
|
||||
return "Couldn't get the local path for version \(version.description)."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class XPMEnvCommand {
|
||||
public class tuistEnvCommand {
|
||||
public init() {}
|
||||
|
||||
public func execute() {
|
||||
|
@ -57,14 +57,14 @@ public class XPMEnvCommand {
|
|||
// }
|
||||
//
|
||||
// if versionToOpen == nil {
|
||||
// throw XpmEnvError.noVersionAvailable
|
||||
// throw tuistEnvError.noVersionAvailable
|
||||
// }
|
||||
//
|
||||
// guard let path = localVersionsController.path(version: versionToOpen) else {
|
||||
// throw XpmEnvError.pathNotFound(versionToOpen)
|
||||
// throw tuistEnvError.pathNotFound(versionToOpen)
|
||||
// }
|
||||
//
|
||||
// let cliPath = path.appending(component: "xpm")
|
||||
// let cliPath = path.appending(component: "tuist")
|
||||
//
|
||||
// var arguments: [String] = [cliPath.asString]
|
||||
// /// We drop the first element, which is the path to this executable.
|
|
@ -1,6 +1,6 @@
|
|||
import Foundation
|
||||
import Utility
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
final class UpdateCommand: Command {
|
||||
/// Command name.
|
|
@ -2,7 +2,7 @@ import Basic
|
|||
import Foundation
|
||||
|
||||
/// Protocol that defines the interface of a local environment controller.
|
||||
/// It manages the local directory where xpmenv stores the xpm versions and user settings.
|
||||
/// It manages the local directory where tuistenv stores the tuist versions and user settings.
|
||||
protocol EnvironmentControlling: AnyObject {
|
||||
/// Returns the versions directory.
|
||||
var versionsDirectory: AbsolutePath { get }
|
||||
|
@ -14,7 +14,7 @@ protocol EnvironmentControlling: AnyObject {
|
|||
/// Local environment controller.
|
||||
class EnvironmentController: EnvironmentControlling {
|
||||
/// Returns the default local directory.
|
||||
static let defaultDirectory: AbsolutePath = AbsolutePath(URL(fileURLWithPath: NSHomeDirectory()).path).appending(component: ".xpm")
|
||||
static let defaultDirectory: AbsolutePath = AbsolutePath(URL(fileURLWithPath: NSHomeDirectory()).path).appending(component: ".tuist")
|
||||
|
||||
// MARK: - Attributes
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import Foundation
|
||||
import Utility
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
protocol GitHubClienting: AnyObject {
|
||||
func execute(request: URLRequest) throws -> Any
|
|
@ -4,7 +4,7 @@ class GitHubRequestsFactory {
|
|||
/// MARK: - Constants
|
||||
|
||||
/// Releases repository.
|
||||
static let releasesRepository: String = "tuist/releases"
|
||||
static let releasesRepository: String = "tuist/tuist"
|
||||
|
||||
// MARK: - Attributes
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import Foundation
|
||||
import Utility
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
enum ReleaseDecodeError: FatalError, Equatable {
|
||||
case invalidVersionFormat(String)
|
|
@ -1,8 +1,8 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
/// It defines the interface of an object that can copy the xpm build artifacts
|
||||
/// It defines the interface of an object that can copy the tuist build artifacts
|
||||
/// into a destination folder filtering out the files that are not required.
|
||||
protocol BuildCopying: AnyObject {
|
||||
/// Copies the build artifacts.
|
||||
|
@ -20,8 +20,8 @@ class BuildCopier: BuildCopying {
|
|||
|
||||
/// Files that should be copied (if they exist).
|
||||
static let files: [String] = [
|
||||
"xpm",
|
||||
"xpmembed",
|
||||
"tuist",
|
||||
"tuist-embed",
|
||||
// Project description
|
||||
"ProjectDescription.swiftmodule",
|
||||
"ProjectDescription.swiftdoc",
|
|
@ -1,8 +1,8 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
/// The class that conforms this protocol exposes an interface to install versions of xpm.
|
||||
/// The class that conforms this protocol exposes an interface to install versions of tuist.
|
||||
protocol Installing: AnyObject {
|
||||
/// Installs the version with the given reference in the local environment.
|
||||
/// It checks out the git revision and builds it using the Swift compiler.
|
||||
|
@ -12,7 +12,7 @@ protocol Installing: AnyObject {
|
|||
func install(version: String) throws
|
||||
}
|
||||
|
||||
/// Util to install versions of xpm in the local environment.
|
||||
/// Util to install versions of tuist in the local environment.
|
||||
final class Installer: Installing {
|
||||
|
||||
// MARK: - Attributes
|
||||
|
@ -71,7 +71,7 @@ final class Installer: Installing {
|
|||
///
|
||||
/// - Parameters:
|
||||
/// - version: reference to be installed. It can be a commit sha or a git tag.
|
||||
/// - temporaryDirectory: temporary directory used to download and build xpm.
|
||||
/// - temporaryDirectory: temporary directory used to download and build tuist.
|
||||
/// - Throws: an error if the installation fails. It can happen if the repository cannot be cloned, the reference doesn't exist, or the compilation fails.
|
||||
func install(version: String,
|
||||
temporaryDirectory: TemporaryDirectory) throws {
|
||||
|
@ -98,9 +98,9 @@ final class Installer: Installing {
|
|||
try buildCopier.copy(from: buildDirectory,
|
||||
to: installationDirectory)
|
||||
|
||||
// Create .xpm-version file
|
||||
let xpmVersionPath = installationDirectory.appending(component: Constants.versionFileName)
|
||||
try "\(version)".write(to: xpmVersionPath.url, atomically: true, encoding: .utf8)
|
||||
// Create .tuist-version file
|
||||
let tuistVersionPath = installationDirectory.appending(component: Constants.versionFileName)
|
||||
try "\(version)".write(to: tuistVersionPath.url, atomically: true, encoding: .utf8)
|
||||
|
||||
printer.print("Version \(version) installed.")
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
import Foundation
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
/// The class that conforms this protocol exposes an interface for interacting with the user settings.
|
||||
protocol SettingsControlling: AnyObject {
|
|
@ -1,7 +1,7 @@
|
|||
import Foundation
|
||||
|
||||
/// Objects that conform this interface expose an interface for checking
|
||||
/// updates of xpm and installing them.
|
||||
/// updates of tuist and installing them.
|
||||
protocol Updating: AnyObject {
|
||||
/// Checks if there's a new version available. If there is it installs it locally.
|
||||
///
|
|
@ -1,7 +1,7 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import Utility
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
/// Resolved version.
|
||||
///
|
||||
|
@ -68,7 +68,7 @@ enum VersionResolverError: FatalError, Equatable {
|
|||
}
|
||||
|
||||
/// Resolves the version that should be used at the given path.
|
||||
/// The tool looks up recursively the directory and its ancestors until it finds a .xpm-version
|
||||
/// The tool looks up recursively the directory and its ancestors until it finds a .tuist-version
|
||||
/// If a version is not defined it returns nil.
|
||||
class VersionResolver: VersionResolving {
|
||||
|
||||
|
@ -95,12 +95,12 @@ class VersionResolver: VersionResolving {
|
|||
return try resolveTraversing(from: path)
|
||||
}
|
||||
|
||||
/// Resolves the version by traversing through the parents looking up for a .xpm-version
|
||||
/// file or a .xpm-bin directory.
|
||||
/// Resolves the version by traversing through the parents looking up for a .tuist-version
|
||||
/// file or a .tuist-bin directory.
|
||||
///
|
||||
/// - Parameter path: path to traverse from.
|
||||
/// - Returns: resolved version.
|
||||
/// - Throws: an error if the resolution fails. It can happen if the .xpm-version has an invalid format
|
||||
/// - Throws: an error if the resolution fails. It can happen if the .tuist-version has an invalid format
|
||||
/// or cannot be read or the bundled binary is in a invalid state.
|
||||
fileprivate func resolveTraversing(from path: AbsolutePath) throws -> ResolvedVersion {
|
||||
let versionPath = path.appending(component: Constants.versionFileName)
|
||||
|
@ -116,9 +116,9 @@ class VersionResolver: VersionResolving {
|
|||
return .undefined
|
||||
}
|
||||
|
||||
/// Resolves a .xpm-version file.
|
||||
/// Resolves a .tuist-version file.
|
||||
///
|
||||
/// - Parameter path: path to the .xpm-version file.
|
||||
/// - Parameter path: path to the .tuist-version file.
|
||||
/// - Returns: resolved version.
|
||||
/// - Throws: an error if the file cannot be opened or it has an invalid format.
|
||||
fileprivate func resolveVersionFile(path: AbsolutePath) throws -> ResolvedVersion {
|
|
@ -1,13 +1,13 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import Utility
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
protocol VersionsControlling: AnyObject {
|
||||
/// Installation
|
||||
typealias Installation = (AbsolutePath) throws -> Void
|
||||
|
||||
/// This methods should be used for installing new versions of xpm.
|
||||
/// This methods should be used for installing new versions of tuist.
|
||||
/// It calls the given installation closure with a directory where the
|
||||
/// app should be installed.
|
||||
///
|
||||
|
@ -87,7 +87,7 @@ class VersionsController: VersionsControlling {
|
|||
self.fileHandler = fileHandler
|
||||
}
|
||||
|
||||
/// This methods should be used for installing new versions of xpm.
|
||||
/// This methods should be used for installing new versions of tuist.
|
||||
/// It calls the given installation closure with a directory where the
|
||||
/// app should be installed.
|
||||
///
|
|
@ -1,7 +1,7 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import Utility
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
public final class CommandRegistry {
|
||||
|
||||
|
@ -31,7 +31,7 @@ public final class CommandRegistry {
|
|||
processArguments: @escaping () -> [String]) {
|
||||
self.commandCheck = commandCheck
|
||||
self.errorHandler = errorHandler
|
||||
parser = ArgumentParser(commandName: "xpm",
|
||||
parser = ArgumentParser(commandName: "tuist",
|
||||
usage: "<command> <options>",
|
||||
overview: "Generate, build and test your Xcode projects.",
|
||||
seeAlso: "http://docs.xcodepm.com/")
|
|
@ -1,7 +1,7 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import Utility
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
class CreateIssueCommand: NSObject, Command {
|
||||
static let createIssueUrl: String = "https://github.com/tuist/tuist/issues/new"
|
|
@ -1,7 +1,7 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import Utility
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
enum DumpCommandError: FatalError, Equatable {
|
||||
case manifestNotFound(AbsolutePath)
|
|
@ -1,7 +1,7 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import Utility
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
class GenerateCommand: NSObject, Command {
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import Utility
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
enum InitCommandError: FatalError {
|
||||
case alreadyExists(AbsolutePath)
|
|
@ -1,14 +1,14 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import Utility
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
class VersionCommand: NSObject, Command {
|
||||
|
||||
// MARK: - Command
|
||||
|
||||
static let command = "version"
|
||||
static let overview = "Outputs the current version of xpm."
|
||||
static let overview = "Outputs the current version of tuist."
|
||||
|
||||
// MARK: - Attributes
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
// MARK: - Type
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
// Reference: https://github.com/xcodeswift/xctools/blob/master/Sources/Frameworks/EmbedCommand.swift
|
||||
import Basic
|
||||
import Foundation
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
public class FrameworkEmbedder {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import Foundation
|
||||
import Utility
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
extension ArgumentParserError: FatalError {
|
||||
public var type: ErrorType {
|
|
@ -1,7 +1,7 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import xcodeproj
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
enum BuildPhaseGenerationError: FatalError, Equatable {
|
||||
case missingFileReference(AbsolutePath)
|
|
@ -1,7 +1,7 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import xcodeproj
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
protocol ConfigGenerating: AnyObject {
|
||||
func generateProjectConfig(project: Project,
|
|
@ -1,5 +1,5 @@
|
|||
import Foundation
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
/// Generator context protocol.
|
||||
@available(*, deprecated, message: "The context approach for injecting dependencies is deprecated. Inject dependencies through the constructor instead.")
|
|
@ -1,7 +1,7 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import xcodeproj
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
/// Link generator error.
|
||||
///
|
||||
|
@ -126,7 +126,7 @@ final class LinkGenerator: LinkGenerating {
|
|||
/// - pbxTarget: Xcode target.
|
||||
/// - objects: Xcode project objects.
|
||||
/// - fileElements: project file elements.
|
||||
/// - resourceLocator: resource locator used to get the path to the "xpmembed" util.
|
||||
/// - resourceLocator: resource locator used to get the path to the "tuist-embed" util.
|
||||
/// - sourceRootPath: path to the folder where the Xcode project is generated.
|
||||
func generateEmbedPhase(dependencies: [DependencyReference],
|
||||
pbxTarget: PBXTarget,
|
|
@ -1,7 +1,7 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import xcodeproj
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
/// Interface for targets generation.
|
||||
protocol TargetGenerating: AnyObject {
|
|
@ -1,5 +1,5 @@
|
|||
import Foundation
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
struct LintingError: FatalError, Equatable {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
protocol ProjectLinting: AnyObject {
|
||||
func lint(_ project: Project) -> [LintingIssue]
|
|
@ -1,5 +1,5 @@
|
|||
import Foundation
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
protocol TargetLinting: AnyObject {
|
||||
func lint(target: Target) -> [LintingIssue]
|
|
@ -1,6 +1,6 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
/// Graph error.
|
||||
///
|
|
@ -1,6 +1,6 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
protocol GraphJSONInitiatable {
|
||||
init(json: JSON, projectPath: AbsolutePath, fileHandler: FileHandling) throws
|
|
@ -1,6 +1,6 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
protocol GraphLoading: AnyObject {
|
||||
func load(path: AbsolutePath) throws -> Graph
|
|
@ -1,6 +1,6 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
/// Protocol that defines the interface of the context that is used during the graph loading.
|
||||
@available(*, deprecated, message: "The context approach for injecting dependencies is deprecated. Inject dependencies through the constructor instead.")
|
|
@ -1,6 +1,6 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
enum GraphLoadingError: FatalError, Equatable {
|
||||
case missingFile(AbsolutePath)
|
|
@ -1,6 +1,6 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
enum GraphManifestLoaderError: FatalError {
|
||||
case projectDescriptionNotFound(AbsolutePath)
|
|
@ -1,6 +1,6 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
enum GraphModuleLoaderError: FatalError, Equatable {
|
||||
case fileNotFound(AbsolutePath)
|
|
@ -1,6 +1,6 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
class GraphNode: Equatable, Hashable {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
class CoreDataModel: Equatable, GraphJSONInitiatable {
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import xcodeproj
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
/// Headers
|
||||
class Headers: GraphJSONInitiatable, Equatable {
|
|
@ -1,6 +1,6 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
class Project: Equatable {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
class Configuration: Equatable {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
class Target: GraphJSONInitiatable, Equatable {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
class Workspace: Equatable {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import Foundation
|
||||
import Utility
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
/// Command check errors.
|
||||
///
|
||||
|
@ -16,8 +16,8 @@ enum CommandCheckError: FatalError, Equatable {
|
|||
message.append(" Make sure 'swift' is available from your shell and that 'swift version' returns the language version")
|
||||
return message
|
||||
case let .incompatibleSwiftVersion(system, expected):
|
||||
var message = "The Swift version in your system, \(system) is incompatible with the version xpm expects \(expected)"
|
||||
message.append(" If you updated Xcode recently, update xpm to the lastest version.")
|
||||
var message = "The Swift version in your system, \(system) is incompatible with the version tuist expects \(expected)"
|
||||
message.append(" If you updated Xcode recently, update tuist to the lastest version.")
|
||||
return message
|
||||
}
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
import Foundation
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
/// Context protocol.
|
||||
@available(*, deprecated, message: "The context approach for injecting dependencies is deprecated. Inject dependencies through the constructor instead.")
|
||||
|
@ -17,7 +17,7 @@ protocol Contexting: AnyObject {
|
|||
var resourceLocator: ResourceLocating { get }
|
||||
}
|
||||
|
||||
/// xpm uses contexts as a dependency injection mechanism.
|
||||
/// tuist uses contexts as a dependency injection mechanism.
|
||||
/// Contexts are initialized by the commands and passed to the different components that will use the dependencies defined in them.
|
||||
@available(*, deprecated, message: "The context approach for injecting dependencies is deprecated. Inject dependencies through the constructor instead.")
|
||||
class Context: Contexting {
|
|
@ -1,6 +1,6 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
protocol InfoPlistProvisioning: AnyObject {
|
||||
func generate(path: AbsolutePath, platform: Platform, product: Product) throws
|
|
@ -1,8 +1,8 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import xpmcore
|
||||
import TuistCore
|
||||
|
||||
/// Util to locate resources such es the ProjectDescription.framework or the xpm cli binary.
|
||||
/// Util to locate resources such es the ProjectDescription.framework or the tuist cli binary.
|
||||
protocol ResourceLocating: AnyObject {
|
||||
/// Returns the ProjectDescription.framework path.
|
||||
///
|
||||
|
@ -14,7 +14,7 @@ protocol ResourceLocating: AnyObject {
|
|||
/// Returns the CLI path.
|
||||
///
|
||||
/// - Parameter context: context.
|
||||
/// - Returns: path to the xpm CLI.
|
||||
/// - Returns: path to the tuist CLI.
|
||||
/// - Throws: an error if the CLI cannot be found.
|
||||
func cliPath() throws -> AbsolutePath
|
||||
|
||||
|
@ -100,10 +100,10 @@ final class ResourceLocator: ResourceLocating {
|
|||
|
||||
/// Returns the CLI path.
|
||||
///
|
||||
/// - Returns: path to the xpm CLI.
|
||||
/// - Returns: path to the tuist CLI.
|
||||
/// - Throws: an error if the CLI cannot be found.
|
||||
func cliPath() throws -> AbsolutePath {
|
||||
return try toolPath("xpm")
|
||||
return try toolPath("tuist")
|
||||
}
|
||||
|
||||
/// Returns the embed util path.
|
||||
|
@ -111,7 +111,7 @@ final class ResourceLocator: ResourceLocating {
|
|||
/// - Returns: path to the embed util.
|
||||
/// - Throws: an error if embed cannot be found.
|
||||
func embedPath() throws -> AbsolutePath {
|
||||
return try toolPath("xpmembed")
|
||||
return try toolPath("tuist-embed")
|
||||
}
|
||||
|
||||
/// Returns the path to the tool with the given name.
|
|
@ -1,4 +1,4 @@
|
|||
import Foundation
|
||||
import xpmkit
|
||||
import TuistKit
|
||||
|
||||
FrameworkEmbedder().embed()
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue