#8 Checkout, auth. #16
2
Makefile
2
Makefile
@ -5,7 +5,7 @@ build:
|
|||||||
|
|
||||||
.PHONY: buildcli
|
.PHONY: buildcli
|
||||||
buildcli:
|
buildcli:
|
||||||
CGO_ENABLED=0 go build -o bin/app -mod=readonly git.unistack.org/unistack-org/pkgdash/cmd/pkgdashcli
|
CGO_ENABLED=0 go build -o pkgdashcli -mod=readonly git.unistack.org/unistack-org/pkgdash/cmd/pkgdashcli
|
||||||
|
|
||||||
.PHONY: cli
|
.PHONY: cli
|
||||||
cli:
|
cli:
|
||||||
|
@ -45,7 +45,7 @@ var initMsg = `
|
|||||||
merge requests in version control systems.
|
merge requests in version control systems.
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
pkgdashcli --method {{method}} --path {{name of dep}}
|
pkgdashcli --command {{command}} --path {{name of dep}}
|
||||||
|
|
||||||
Commands:
|
Commands:
|
||||||
checkupdate | CheckUpdate collects a list of dependencies with the latest updates.
|
checkupdate | CheckUpdate collects a list of dependencies with the latest updates.
|
||||||
@ -164,8 +164,8 @@ func main() {
|
|||||||
logger.Fatal(ctx, fmt.Sprintf("load cli cfg failed: %v", err))
|
logger.Fatal(ctx, fmt.Sprintf("load cli cfg failed: %v", err))
|
||||||
}
|
}
|
||||||
|
|
||||||
if cliCfg.Path == "" && cliCfg.Method == "" {
|
if cliCfg.Path == "" && cliCfg.Command == "" {
|
||||||
logger.Info(ctx, initMsg)
|
fmt.Print(initMsg)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -241,7 +241,7 @@ func Execute(ctx context.Context, gitSource source.SourceControl, mvs map[string
|
|||||||
var path string
|
var path string
|
||||||
prList := make(map[string]map[string]string)
|
prList := make(map[string]map[string]string)
|
||||||
|
|
||||||
switch cliCfg.Method {
|
switch cliCfg.Command {
|
||||||
case "checkupdate":
|
case "checkupdate":
|
||||||
logger.Info(ctx, fmt.Sprintf("Modules get update: \n %s", mvs))
|
logger.Info(ctx, fmt.Sprintf("Modules get update: \n %s", mvs))
|
||||||
case "update":
|
case "update":
|
||||||
|
@ -24,7 +24,7 @@ type UpdateOpt struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Cli struct {
|
type Cli struct {
|
||||||
Method string `flag:"name=method,desc='choice method(update, close, checkupdaue, list)',default=''"`
|
Command string `flag:"name=command,desc='choice command(update, close, checkupdaue, list)',default=''"`
|
||||||
Path string `flag:"name=path,desc='title of mod',default=''"`
|
Path string `flag:"name=path,desc='title of mod',default=''"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user