Add various tooling and SQLite.swift dependency
This commit is contained in:
parent
60ea7523a1
commit
dab1963191
|
@ -0,0 +1,2 @@
|
|||
realm/SwiftLint@0.32.0
|
||||
skagedal/xcodeproj-modify@1.0.2
|
|
@ -1,6 +1,15 @@
|
|||
{
|
||||
"object": {
|
||||
"pins": [
|
||||
{
|
||||
"package": "SQLite.swift",
|
||||
"repositoryURL": "https://github.com/stephencelis/SQLite.swift.git",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "691fc89e75873d417d700920e79a63cf210d1d71",
|
||||
"version": "0.12.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"package": "llbuild",
|
||||
"repositoryURL": "https://github.com/apple/swift-llbuild.git",
|
||||
|
|
|
@ -12,7 +12,8 @@ let package = Package(
|
|||
],
|
||||
dependencies: [
|
||||
// There is no tagged release of Swift 5's SwiftPM yet, so let's use this for now.
|
||||
.package(url: "https://github.com/apple/swift-package-manager.git", .branch("swift-5.0-branch"))
|
||||
.package(url: "https://github.com/apple/swift-package-manager.git", .branch("swift-5.0-branch")),
|
||||
.package(url: "https://github.com/stephencelis/SQLite.swift.git", from: "0.12.0"),
|
||||
],
|
||||
targets: [
|
||||
.target(
|
||||
|
@ -28,7 +29,8 @@ let package = Package(
|
|||
.target(
|
||||
name: "XcodeSimulatorKit",
|
||||
dependencies: [
|
||||
"SPMUtility"
|
||||
"SPMUtility",
|
||||
"SQLite"
|
||||
]
|
||||
),
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
disabled_rules:
|
||||
- identifier_name
|
||||
- nesting
|
|
@ -63,7 +63,7 @@ struct CommandLineOptions {
|
|||
|
||||
binder.bind(
|
||||
parser: parser,
|
||||
to: { options, subcommand in
|
||||
to: { _, subcommand in
|
||||
print("Parsed subcommand: \(subcommand)")
|
||||
}
|
||||
)
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
//
|
||||
// TrustStore.swift
|
||||
// XcodeSimulatorKit
|
||||
//
|
||||
// Created by Simon Kågedal Reimer on 2019-05-05.
|
||||
//
|
||||
|
||||
import Foundation
|
|
@ -0,0 +1,10 @@
|
|||
//
|
||||
// NOTE: This file is automatically generated by generate-version-swift.sh.
|
||||
// Should not be under version control.
|
||||
//
|
||||
|
||||
public extension XcodeSimulatorTool {
|
||||
static var version: String {
|
||||
return "0.1"
|
||||
}
|
||||
}
|
|
@ -34,7 +34,7 @@ public class XcodeSimulatorTool {
|
|||
case .noCommand:
|
||||
options.printUsage(on: stdoutStream)
|
||||
case .version:
|
||||
print("xcode-simulator-tool version 0.1")
|
||||
print("xcode-simulator-tool version \(XcodeSimulatorTool.version)")
|
||||
case .command(let command):
|
||||
try command.run()
|
||||
}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
mint run xcodeproj-modify xcodeproj-modify ./xcode-simulator-tool.xcodeproj add-run-script-phase xcode-simulator-tool ./xcode-build-phase.sh
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
version="0.1"
|
||||
|
||||
cat > ./Sources/XcodeSimulatorKit/Version.swift <<EOF
|
||||
//
|
||||
// NOTE: This file is automatically generated by generate-version-swift.sh.
|
||||
// Should not be under version control.
|
||||
//
|
||||
|
||||
public extension XcodeSimulatorTool {
|
||||
static var version: String {
|
||||
return "${version}"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
|
||||
# This script should be run to generate the Xcode project.
|
||||
|
||||
# Generate xcodeproj
|
||||
|
||||
swift package generate-xcodeproj
|
||||
|
||||
# Set header template.
|
||||
|
||||
sed s/CURRENTYEAR/`date +%Y`/g > xcode-simulator-tool.xcodeproj/xcshareddata/IDETemplateMacros.plist <<EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>FILEHEADER</key>
|
||||
<string>
|
||||
// Copyright © CURRENTYEAR Simon Kågedal Reimer. See LICENSE.
|
||||
//</string>
|
||||
</dict>
|
||||
</plist>
|
||||
EOF
|
||||
|
||||
echo Please open xcode-simulator-tool.xcodeproj in Xcode.
|
||||
echo Then close it.
|
||||
echo Then run ./add-build-phase.sh
|
||||
echo Then open it again.
|
||||
echo 'Edit Build Settings and make sure "Enable Modules (C and Objective-C)" is set to Yes.'
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
# This should be executed as a build phase in Xcode
|
||||
|
||||
mint run swiftlint swiftlint autocorrect --path Sources
|
||||
mint run swiftlint swiftlint --path Sources
|
Loading…
Reference in New Issue