Skip to content

Commit

Permalink
Generate dependency relationship for Swift project
Browse files Browse the repository at this point in the history
Signed-off-by: Keshav Priyadarshi <[email protected]>
  • Loading branch information
keshav-space committed Jun 24, 2024
1 parent cd2a1b1 commit 6285909
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cmd/swift.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@ import (

func swiftCmd() *cobra.Command {
deplockSwiftManifestDumpFile := "Package.swift.deplock"
deplockSwiftShowDependenciesFile := "swift-show-dependencies.deplock"

resolvedLockFiles := []string{"Package.resolved", ".package.resolved"}
deplockManifestDumpFiles := []string{deplockSwiftManifestDumpFile}
deplockSwiftShowDependenciesFiles := []string{deplockSwiftShowDependenciesFile}

resolvedLockGenCommand := []string{"swift", "package", "resolve"}
deplockManifestDumpGenCommand := []string{"swift", "package", "dump-package"}
deplockShowDependenciesGenCommand := []string{"swift", "package", "show-dependencies", "--format", "json"}

forced := false

Expand Down Expand Up @@ -52,6 +56,14 @@ If no path is provided, the command defaults to the current directory.`,
forced,
)

internal.CreateLockFile(
deplockSwiftShowDependenciesFiles,
args,
deplockShowDependenciesGenCommand,
deplockSwiftShowDependenciesFile,
forced,
)

},
}

Expand Down

0 comments on commit 6285909

Please sign in to comment.