Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1885a90f62 | |||
| da39dd0213 | |||
| f221eceafc | |||
|
|
82ee9f47b8 |
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
@@ -2,7 +2,6 @@ name: CI
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
pull_request:
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
4
.spi.yml
Normal file
4
.spi.yml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
version: 1
|
||||||
|
builder:
|
||||||
|
configs:
|
||||||
|
documentation_targets: [CliVersion]
|
||||||
@@ -5,6 +5,22 @@
|
|||||||
<BuildAction
|
<BuildAction
|
||||||
parallelizeBuildables = "YES"
|
parallelizeBuildables = "YES"
|
||||||
buildImplicitDependencies = "YES">
|
buildImplicitDependencies = "YES">
|
||||||
|
<BuildActionEntries>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "CliVersion"
|
||||||
|
BuildableName = "CliVersion"
|
||||||
|
BlueprintName = "CliVersion"
|
||||||
|
ReferencedContainer = "container:">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
</BuildActionEntries>
|
||||||
</BuildAction>
|
</BuildAction>
|
||||||
<TestAction
|
<TestAction
|
||||||
buildConfiguration = "Debug"
|
buildConfiguration = "Debug"
|
||||||
@@ -16,9 +32,9 @@
|
|||||||
skipped = "NO">
|
skipped = "NO">
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "GitVersionTests"
|
BlueprintIdentifier = "CliVersionTests"
|
||||||
BuildableName = "GitVersionTests"
|
BuildableName = "CliVersionTests"
|
||||||
BlueprintName = "GitVersionTests"
|
BlueprintName = "CliVersionTests"
|
||||||
ReferencedContainer = "container:">
|
ReferencedContainer = "container:">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</TestableReference>
|
</TestableReference>
|
||||||
@@ -41,6 +57,15 @@
|
|||||||
savedToolIdentifier = ""
|
savedToolIdentifier = ""
|
||||||
useCustomWorkingDirectory = "NO"
|
useCustomWorkingDirectory = "NO"
|
||||||
debugDocumentVersioning = "YES">
|
debugDocumentVersioning = "YES">
|
||||||
|
<MacroExpansion>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "CliVersion"
|
||||||
|
BuildableName = "CliVersion"
|
||||||
|
BlueprintName = "CliVersion"
|
||||||
|
ReferencedContainer = "container:">
|
||||||
|
</BuildableReference>
|
||||||
|
</MacroExpansion>
|
||||||
</ProfileAction>
|
</ProfileAction>
|
||||||
<AnalyzeAction
|
<AnalyzeAction
|
||||||
buildConfiguration = "Debug">
|
buildConfiguration = "Debug">
|
||||||
@@ -14,23 +14,23 @@
|
|||||||
buildForAnalyzing = "YES">
|
buildForAnalyzing = "YES">
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "swift-git-version"
|
BlueprintIdentifier = "cli-version"
|
||||||
BuildableName = "swift-git-version"
|
BuildableName = "cli-version"
|
||||||
BlueprintName = "swift-git-version"
|
BlueprintName = "cli-version"
|
||||||
ReferencedContainer = "container:">
|
ReferencedContainer = "container:">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildActionEntry>
|
</BuildActionEntry>
|
||||||
<BuildActionEntry
|
<BuildActionEntry
|
||||||
buildForTesting = "YES"
|
buildForTesting = "YES"
|
||||||
buildForRunning = "YES"
|
buildForRunning = "YES"
|
||||||
buildForProfiling = "YES"
|
buildForProfiling = "NO"
|
||||||
buildForArchiving = "YES"
|
buildForArchiving = "NO"
|
||||||
buildForAnalyzing = "YES">
|
buildForAnalyzing = "YES">
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "GitVersion"
|
BlueprintIdentifier = "CliVersionTests"
|
||||||
BuildableName = "GitVersion"
|
BuildableName = "CliVersionTests"
|
||||||
BlueprintName = "GitVersion"
|
BlueprintName = "CliVersionTests"
|
||||||
ReferencedContainer = "container:">
|
ReferencedContainer = "container:">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildActionEntry>
|
</BuildActionEntry>
|
||||||
@@ -40,16 +40,15 @@
|
|||||||
buildConfiguration = "Debug"
|
buildConfiguration = "Debug"
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||||
codeCoverageEnabled = "YES">
|
|
||||||
<Testables>
|
<Testables>
|
||||||
<TestableReference
|
<TestableReference
|
||||||
skipped = "NO">
|
skipped = "NO">
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "GitVersionTests"
|
BlueprintIdentifier = "CliVersionTests"
|
||||||
BuildableName = "GitVersionTests"
|
BuildableName = "CliVersionTests"
|
||||||
BlueprintName = "GitVersionTests"
|
BlueprintName = "CliVersionTests"
|
||||||
ReferencedContainer = "container:">
|
ReferencedContainer = "container:">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</TestableReference>
|
</TestableReference>
|
||||||
@@ -70,9 +69,9 @@
|
|||||||
runnableDebuggingMode = "0">
|
runnableDebuggingMode = "0">
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "swift-git-version"
|
BlueprintIdentifier = "cli-version"
|
||||||
BuildableName = "swift-git-version"
|
BuildableName = "cli-version"
|
||||||
BlueprintName = "swift-git-version"
|
BlueprintName = "cli-version"
|
||||||
ReferencedContainer = "container:">
|
ReferencedContainer = "container:">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildableProductRunnable>
|
</BuildableProductRunnable>
|
||||||
@@ -87,9 +86,9 @@
|
|||||||
runnableDebuggingMode = "0">
|
runnableDebuggingMode = "0">
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "swift-git-version"
|
BlueprintIdentifier = "cli-version"
|
||||||
BuildableName = "swift-git-version"
|
BuildableName = "cli-version"
|
||||||
BlueprintName = "swift-git-version"
|
BlueprintName = "cli-version"
|
||||||
ReferencedContainer = "container:">
|
ReferencedContainer = "container:">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildableProductRunnable>
|
</BuildableProductRunnable>
|
||||||
@@ -0,0 +1,156 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Scheme
|
||||||
|
LastUpgradeVersion = "1420"
|
||||||
|
version = "1.3">
|
||||||
|
<BuildAction
|
||||||
|
parallelizeBuildables = "YES"
|
||||||
|
buildImplicitDependencies = "YES">
|
||||||
|
<BuildActionEntries>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "CliVersion"
|
||||||
|
BuildableName = "CliVersion"
|
||||||
|
BlueprintName = "CliVersion"
|
||||||
|
ReferencedContainer = "container:">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "cli-version"
|
||||||
|
BuildableName = "cli-version"
|
||||||
|
BlueprintName = "cli-version"
|
||||||
|
ReferencedContainer = "container:">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "NO"
|
||||||
|
buildForArchiving = "NO"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "CliVersionTests"
|
||||||
|
BuildableName = "CliVersionTests"
|
||||||
|
BlueprintName = "CliVersionTests"
|
||||||
|
ReferencedContainer = "container:">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "BuildWithVersionPlugin"
|
||||||
|
BuildableName = "BuildWithVersionPlugin"
|
||||||
|
BlueprintName = "BuildWithVersionPlugin"
|
||||||
|
ReferencedContainer = "container:">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "GenerateVersionPlugin"
|
||||||
|
BuildableName = "GenerateVersionPlugin"
|
||||||
|
BlueprintName = "GenerateVersionPlugin"
|
||||||
|
ReferencedContainer = "container:">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "UpdateVersionPlugin"
|
||||||
|
BuildableName = "UpdateVersionPlugin"
|
||||||
|
BlueprintName = "UpdateVersionPlugin"
|
||||||
|
ReferencedContainer = "container:">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
</BuildActionEntries>
|
||||||
|
</BuildAction>
|
||||||
|
<TestAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||||
|
<Testables>
|
||||||
|
<TestableReference
|
||||||
|
skipped = "NO">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "CliVersionTests"
|
||||||
|
BuildableName = "CliVersionTests"
|
||||||
|
BlueprintName = "CliVersionTests"
|
||||||
|
ReferencedContainer = "container:">
|
||||||
|
</BuildableReference>
|
||||||
|
</TestableReference>
|
||||||
|
</Testables>
|
||||||
|
</TestAction>
|
||||||
|
<LaunchAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
launchStyle = "0"
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
|
debugDocumentVersioning = "YES"
|
||||||
|
debugServiceExtension = "internal"
|
||||||
|
allowLocationSimulation = "YES">
|
||||||
|
<MacroExpansion>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "cli-version"
|
||||||
|
BuildableName = "cli-version"
|
||||||
|
BlueprintName = "cli-version"
|
||||||
|
ReferencedContainer = "container:">
|
||||||
|
</BuildableReference>
|
||||||
|
</MacroExpansion>
|
||||||
|
</LaunchAction>
|
||||||
|
<ProfileAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
savedToolIdentifier = ""
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
debugDocumentVersioning = "YES">
|
||||||
|
<MacroExpansion>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "cli-version"
|
||||||
|
BuildableName = "cli-version"
|
||||||
|
BlueprintName = "cli-version"
|
||||||
|
ReferencedContainer = "container:">
|
||||||
|
</BuildableReference>
|
||||||
|
</MacroExpansion>
|
||||||
|
</ProfileAction>
|
||||||
|
<AnalyzeAction
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
</AnalyzeAction>
|
||||||
|
<ArchiveAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
revealArchiveInOrganizer = "YES">
|
||||||
|
</ArchiveAction>
|
||||||
|
</Scheme>
|
||||||
@@ -5,8 +5,8 @@
|
|||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/pointfreeco/combine-schedulers",
|
"location" : "https://github.com/pointfreeco/combine-schedulers",
|
||||||
"state" : {
|
"state" : {
|
||||||
"revision" : "882ac01eb7ef9e36d4467eb4b1151e74fcef85ab",
|
"revision" : "9dc9cbe4bc45c65164fa653a563d8d8db61b09bb",
|
||||||
"version" : "0.9.1"
|
"version" : "1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -23,8 +23,8 @@
|
|||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/apple/swift-argument-parser.git",
|
"location" : "https://github.com/apple/swift-argument-parser.git",
|
||||||
"state" : {
|
"state" : {
|
||||||
"revision" : "fee6933f37fde9a5e12a1e4aeaa93fe60116ff2a",
|
"revision" : "8f4d2753f0e4778c76d5f05ad16c74f707390531",
|
||||||
"version" : "1.2.2"
|
"version" : "1.2.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -32,8 +32,17 @@
|
|||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/pointfreeco/swift-clocks",
|
"location" : "https://github.com/pointfreeco/swift-clocks",
|
||||||
"state" : {
|
"state" : {
|
||||||
"revision" : "20b25ca0dd88ebfb9111ec937814ddc5a8880172",
|
"revision" : "d1fd837326aa719bee979bdde1f53cd5797443eb",
|
||||||
"version" : "0.2.0"
|
"version" : "1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "swift-concurrency-extras",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/pointfreeco/swift-concurrency-extras",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "ea631ce892687f5432a833312292b80db238186a",
|
||||||
|
"version" : "1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -41,8 +50,8 @@
|
|||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/pointfreeco/swift-dependencies.git",
|
"location" : "https://github.com/pointfreeco/swift-dependencies.git",
|
||||||
"state" : {
|
"state" : {
|
||||||
"revision" : "6bb1034e8a1bfbf46dfb766b6c09b7b17e1cba10",
|
"revision" : "4e1eb6e28afe723286d8cc60611237ffbddba7c5",
|
||||||
"version" : "0.2.0"
|
"version" : "1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -50,8 +59,8 @@
|
|||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/apple/swift-docc-plugin.git",
|
"location" : "https://github.com/apple/swift-docc-plugin.git",
|
||||||
"state" : {
|
"state" : {
|
||||||
"revision" : "10bc670db657d11bdd561e07de30a9041311b2b1",
|
"revision" : "26ac5758409154cc448d7ab82389c520fa8a8247",
|
||||||
"version" : "1.1.0"
|
"version" : "1.3.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -68,8 +77,8 @@
|
|||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/apple/swift-log.git",
|
"location" : "https://github.com/apple/swift-log.git",
|
||||||
"state" : {
|
"state" : {
|
||||||
"revision" : "32e8d724467f8fe623624570367e3d50c5638e46",
|
"revision" : "532d8b529501fb73a2455b179e0bbb6d49b652ed",
|
||||||
"version" : "1.5.2"
|
"version" : "1.5.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -86,8 +95,8 @@
|
|||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/m-housh/swift-shell-client.git",
|
"location" : "https://github.com/m-housh/swift-shell-client.git",
|
||||||
"state" : {
|
"state" : {
|
||||||
"revision" : "bcd7a06377d43bac71c086d97d82e6c18504277e",
|
"revision" : "9c0c4757d0a2e313d1a4a28e60418a753d3e4230",
|
||||||
"version" : "0.1.3"
|
"version" : "0.1.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -95,8 +104,8 @@
|
|||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/pointfreeco/xctest-dynamic-overlay",
|
"location" : "https://github.com/pointfreeco/xctest-dynamic-overlay",
|
||||||
"state" : {
|
"state" : {
|
||||||
"revision" : "ab8c9f45843694dd16be4297e6d44c0634fd9913",
|
"revision" : "23cbf2294e350076ea4dbd7d5d047c1e76b03631",
|
||||||
"version" : "0.8.4"
|
"version" : "1.0.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
# swift-cli-version
|
# swift-cli-version
|
||||||
[](https://github.com/m-housh/swift-cli-version/actions/workflows/ci.yml)
|
[](https://github.com/m-housh/swift-cli-version/actions/workflows/ci.yml)
|
||||||
|
[](https://swiftpackageindex.com/m-housh/swift-cli-version)
|
||||||
|
[](https://swiftpackageindex.com/m-housh/swift-cli-version)
|
||||||
|
|
||||||
A swift package that exposes some plugins to set the version of a command line tool to the
|
A swift package that exposes some plugins to set the version of a command line tool to the
|
||||||
git tag or the git sha, if a tag is not set for the current commit.
|
git tag or the git sha, if a tag is not set for the current commit.
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import XCTestDynamicOverlay
|
|||||||
/// Represents the interactions with the file system. It is able
|
/// Represents the interactions with the file system. It is able
|
||||||
/// to read from and write to files.
|
/// to read from and write to files.
|
||||||
///
|
///
|
||||||
|
///
|
||||||
/// ```swift
|
/// ```swift
|
||||||
/// @Dependency(\.fileClient) var fileClient
|
/// @Dependency(\.fileClient) var fileClient
|
||||||
/// ```
|
/// ```
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
// Do not set this variable, it is set during the build process.
|
// Do not set this variable, it is set during the build process.
|
||||||
let VERSION: String? = "main 3dc5d8f"
|
let VERSION: String? = "0.1.0"
|
||||||
|
|||||||
@@ -47,22 +47,21 @@ final class GitVersionTests: XCTestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func test_commands() throws {
|
func test_commands() throws {
|
||||||
@Dependency(\.shellClient) var shellClient
|
@Dependency(\.shellClient) var shellClient: ShellClient
|
||||||
|
|
||||||
let branch = try shellClient.background(
|
XCTAssertNoThrow(
|
||||||
.gitCurrentBranch(gitDirectory: gitDir),
|
try shellClient.background(
|
||||||
trimmingCharactersIn: .whitespacesAndNewlines
|
.gitCurrentBranch(gitDirectory: gitDir),
|
||||||
|
trimmingCharactersIn: .whitespacesAndNewlines
|
||||||
|
)
|
||||||
)
|
)
|
||||||
print("BRANCH: \(branch)")
|
|
||||||
XCTAssertEqual(branch, "main")
|
|
||||||
|
|
||||||
let commit = try shellClient.background(
|
XCTAssertNoThrow(
|
||||||
.gitCurrentSha(gitDirectory: gitDir),
|
try shellClient.background(
|
||||||
trimmingCharactersIn: .whitespacesAndNewlines
|
.gitCurrentSha(gitDirectory: gitDir),
|
||||||
|
trimmingCharactersIn: .whitespacesAndNewlines
|
||||||
|
)
|
||||||
)
|
)
|
||||||
print("COMMIT: \(commit)")
|
|
||||||
XCTAssertNotEqual(commit, "")
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func test_file_client() throws {
|
func test_file_client() throws {
|
||||||
|
|||||||
Reference in New Issue
Block a user