-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from g-Off/squash-framework
squash framework since it served no purpose
- Loading branch information
Showing
14 changed files
with
56 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// | ||
// SaveCommand.swift | ||
// XcoderKit | ||
// | ||
// Created by Geoffrey Foster on 2019-05-02. | ||
// | ||
|
||
import Foundation | ||
import XcodeProject | ||
import CommandRegistry | ||
|
||
public struct SaveCommand: Command { | ||
private struct SaveArguments { | ||
var xcodeproj: AbsolutePath = localFileSystem.currentWorkingDirectory! | ||
} | ||
|
||
public let command: String = "save" | ||
public let overview: String = "Saves the Xcode project." | ||
private let binder = ArgumentBinder<SaveArguments>() | ||
|
||
public init(parser: ArgumentParser) { | ||
let subparser = parser.add(subparser: command, overview: overview) | ||
binder.bind(positional: subparser.add(positional: "xcodeproj", kind: PathArgument.self, optional: false, usage: "Xcode Project file.", completion: .filename)) { (syncArguments, xcodeproj) in | ||
syncArguments.xcodeproj = xcodeproj.path | ||
} | ||
} | ||
|
||
public func run(with parsedArguments: ArgumentParser.Result) throws { | ||
var arguments = SaveArguments() | ||
try binder.fill(parseResult: parsedArguments, into: &arguments) | ||
|
||
let projectFile: ProjectFile | ||
do { | ||
projectFile = try ProjectFile(url: Foundation.URL(fileURLWithPath: arguments.xcodeproj.asString)) | ||
} catch { | ||
throw Error.invalidProject(path: arguments.xcodeproj.asString) | ||
} | ||
try projectFile.save() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,6 @@ | |
// | ||
|
||
import Foundation | ||
import Utility | ||
import Basic | ||
import XcodeProject | ||
import CommandRegistry | ||
|
||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import Utility | ||
import CommandRegistry | ||
|
||
extension Version { | ||
static var current: Version = "0.3.3" | ||
static var current: Version = "0.3.5" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters