diff --git a/buildtools/cli.go b/buildtools/cli.go index f90525d12..509defd9d 100644 --- a/buildtools/cli.go +++ b/buildtools/cli.go @@ -1142,15 +1142,15 @@ func huggingFaceCmd(c *cli.Context) error { cmdName, hfArgs := getCommandName(args) switch cmdName { case "u", "upload": - return huggingFaceUploadCmd(c, hfArgs) + return huggingFaceUploadCmd(c, "upload", hfArgs) case "d", "download": - return huggingFaceDownloadCmd(c, hfArgs) + return huggingFaceDownloadCmd(c, "download", hfArgs) default: return errorutils.CheckErrorf("unknown HuggingFace command: '%s'. Valid commands are: upload (u), download (d)", cmdName) } } -func huggingFaceUploadCmd(c *cli.Context, hfArgs []string) error { +func huggingFaceUploadCmd(c *cli.Context, cmdName string, hfArgs []string) error { // Upload requires folderPath and repoID if len(hfArgs) < 2 { return cliutils.PrintHelpAndReturnError("Folder path and repository ID are required.", c) @@ -1184,6 +1184,7 @@ func huggingFaceUploadCmd(c *cli.Context, hfArgs []string) error { repoType = "model" } huggingFaceUploadCmd := huggingfaceCommands.NewHuggingFaceUpload(). + SetCommandName(cmdName). SetFolderPath(folderPath). SetRepoId(repoID). SetRepoType(repoType). @@ -1193,7 +1194,7 @@ func huggingFaceUploadCmd(c *cli.Context, hfArgs []string) error { return commands.Exec(huggingFaceUploadCmd) } -func huggingFaceDownloadCmd(c *cli.Context, hfArgs []string) error { +func huggingFaceDownloadCmd(c *cli.Context, cmdName string, hfArgs []string) error { // Download requires repoID if len(hfArgs) < 1 { return cliutils.PrintHelpAndReturnError("Model/Dataset name is required.", c) @@ -1231,6 +1232,7 @@ func huggingFaceDownloadCmd(c *cli.Context, hfArgs []string) error { revision = "main" } huggingFaceDownloadCmd := huggingfaceCommands.NewHuggingFaceDownload(). + SetCommandName(cmdName). SetRepoId(repoID). SetRepoType(repoType). SetRevision(revision). diff --git a/go.mod b/go.mod index 29ca67690..04aa2a3f0 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/jfrog/build-info-go v1.13.1-0.20260216093441-40a4dc563294 github.com/jfrog/gofrog v1.7.6 github.com/jfrog/jfrog-cli-application v1.0.2-0.20260216085810-1ade6c26b3df - github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260303101540-67cc7f55724b + github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260306051209-069e33e2eacc github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20260225195817-bc599cec3973 github.com/jfrog/jfrog-cli-evidence v0.8.3-0.20260202100913-d9ee9476845a github.com/jfrog/jfrog-cli-platform-services v1.10.1-0.20260213131956-d1d39bf3a042 diff --git a/go.sum b/go.sum index e101fd422..b46343f66 100644 --- a/go.sum +++ b/go.sum @@ -419,8 +419,8 @@ github.com/jfrog/jfrog-apps-config v1.0.1 h1:mtv6k7g8A8BVhlHGlSveapqf4mJfonwvXYL github.com/jfrog/jfrog-apps-config v1.0.1/go.mod h1:8AIIr1oY9JuH5dylz2S6f8Ym2MaadPLR6noCBO4C22w= github.com/jfrog/jfrog-cli-application v1.0.2-0.20260216085810-1ade6c26b3df h1:raSyae8/h1y8HtzFLf7vZZj91fP/qD94AX+biwBJiqs= github.com/jfrog/jfrog-cli-application v1.0.2-0.20260216085810-1ade6c26b3df/go.mod h1:xum2HquWO5uExa/A7MQs3TgJJVEeoqTR+6Z4mfBr1Xw= -github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260303101540-67cc7f55724b h1:RFVA0SoRC1Hf54BdDkt3mv4x5t3600AqUcpA5Fy3n3E= -github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260303101540-67cc7f55724b/go.mod h1:IRUe9nYwCUq8V2WRDUd4bddwiXXdkxvNQ36+0U0uHqI= +github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260306051209-069e33e2eacc h1:ohs3JUmn1Bn5vf22AjgYLwmMwgYdKGQnxORayP0xkqY= +github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260306051209-069e33e2eacc/go.mod h1:IRUe9nYwCUq8V2WRDUd4bddwiXXdkxvNQ36+0U0uHqI= github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20260225195817-bc599cec3973 h1:awB01Y4m0cWzmXuR3waf5IQnoQxDlbUmqT+FMWOpjbs= github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20260225195817-bc599cec3973/go.mod h1:yhi+XpiEx18a3t8CZ6M2VpAf3EGqKpBhTzoPBTFe0dk= github.com/jfrog/jfrog-cli-evidence v0.8.3-0.20260202100913-d9ee9476845a h1:lTOAhUjKcOmM/0Kbj4V+I/VHPlW7YNAhIEVpGnCM5mI=