3 Commits
dev ... 0.1.0

Author SHA1 Message Date
f547b02c8f Version 0.1.0
Some checks failed
CI / macOS (debug, 14.2) (push) Has been cancelled
CI / macOS (release, 14.2) (push) Has been cancelled
2023-03-15 15:03:08 -04:00
52d04d998c Version 0.1.0 2023-03-15 14:49:50 -04:00
2b663d2c1f Version 0.1.0 2023-03-15 14:39:59 -04:00
6 changed files with 13 additions and 170 deletions

View File

@@ -2,7 +2,6 @@ name: CI
on: on:
push: push:
pull_request:
workflow_dispatch: workflow_dispatch:
jobs: jobs:

View File

@@ -1,52 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1420"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "GitVersionTests"
BuildableName = "GitVersionTests"
BlueprintName = "GitVersionTests"
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">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@@ -1,104 +0,0 @@
<?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 = "swift-git-version"
BuildableName = "swift-git-version"
BlueprintName = "swift-git-version"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "GitVersion"
BuildableName = "GitVersion"
BlueprintName = "GitVersion"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "GitVersionTests"
BuildableName = "GitVersionTests"
BlueprintName = "GitVersionTests"
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"
viewDebuggingEnabled = "No">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "swift-git-version"
BuildableName = "swift-git-version"
BlueprintName = "swift-git-version"
ReferencedContainer = "container:">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "swift-git-version"
BuildableName = "swift-git-version"
BlueprintName = "swift-git-version"
ReferencedContainer = "container:">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@@ -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
/// ``` /// ```

View File

@@ -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"

View File

@@ -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 {