-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support lockfile generation for cocoapods
Signed-off-by: Keshav Priyadarshi <[email protected]>
- Loading branch information
1 parent
595f77d
commit 5a93a78
Showing
4 changed files
with
48 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
Copyright (c) nexB Inc. and others. All rights reserved. | ||
ScanCode is a trademark of nexB Inc. | ||
SPDX-License-Identifier: Apache-2.0 | ||
See http://www.apache.org/licenses/LICENSE-2.0 for the license text. | ||
See https://github.com/nexB/dependency-inspector for support or download. | ||
See https://aboutcode.org for more information about nexB OSS projects. | ||
*/ | ||
|
||
package cmd | ||
|
||
import ( | ||
"github.com/nexB/dependency-inspector/internal" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
func cocoapodsCmd() *cobra.Command { | ||
lockFiles := []string{"Podfile.lock"} | ||
lockGenCommand := []string{"pod", "install"} | ||
forced := false | ||
|
||
cocoapodsCmd := &cobra.Command{ | ||
Use: "cocoapods [path]", | ||
Short: "Generate lockfile for cocoapods project", | ||
Long: `Create lockfile for cocoapods project if it doesn't exist in the specified [path]. | ||
If no path is provided, the command defaults to the current directory.`, | ||
Args: cobra.MaximumNArgs(1), | ||
Run: func(cmd *cobra.Command, args []string) { | ||
internal.CreateLockFile( | ||
lockFiles, | ||
args, | ||
lockGenCommand, | ||
"", | ||
forced, | ||
) | ||
}, | ||
} | ||
|
||
cocoapodsCmd.Flags().BoolVarP(&forced, "force", "f", false, "Generate lockfile forcibly, ignoring existing lockfiles") | ||
|
||
return cocoapodsCmd | ||
} |
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