Skip to content
This repository has been archived by the owner on Oct 20, 2024. It is now read-only.

Commit

Permalink
feature/queue-with-rpc - minor bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MindHunter86 committed Dec 13, 2021
1 parent 50bc973 commit 0ab97a5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 1 addition & 5 deletions cloner/cloner.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"os"
"os/signal"
"regexp"
"strings"
"sync"
"syscall"

Expand Down Expand Up @@ -41,10 +40,7 @@ func NewCloner(l *zerolog.Logger) *Cloner {
func (m *Cloner) Bootstrap(ctx *cli.Context) error {
gCli = ctx

// !!
if strings.ToLower(gCli.String("loglevel")) == "debug" {
gIsDebug = true
}
gIsDebug = gCli.Bool("debug")

var e error
if m.srcNexus, e = newNexus().initiate(gCli.Args().Get(0)); e != nil {
Expand Down
2 changes: 1 addition & 1 deletion cloner/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ func (m *rpcAsset) getDownloadUrl(reponame string, baseurl *url.URL) (data strin
return
}

data = drl.String()
if gCli.Bool("maven-snapshots") {
buf := strings.Split(drl.String(), "/")
bufLen := len(buf)
Expand All @@ -136,7 +137,6 @@ func (m *rpcAsset) getDownloadUrl(reponame string, baseurl *url.URL) (data strin
data = strings.ReplaceAll(drl.String(), buf[bufLen-2]+"/", "")
}

data = drl.String()
gLog.Debug().Msg("Download URL - " + data)
// https://HOST/repository/maven-ums/ru/mts/tvhouse/tvh-core/1.0-M1-20181002.132713-41/tvh-core-1.0-M1-20181002.132713-41-sources.log
}
Expand Down
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ func main() {
Value: 4,
Usage: "Verbose `LEVEL` (value from 5(debug) to 0(panic) and -1 for log disabling(quite mode))",
},
cli.BoolFlag{
Name: "debug",
Usage: "",
},
cli.BoolFlag{
Name: "quite, q",
Usage: "Flag is equivalent to verbose -1",
Expand Down

0 comments on commit 0ab97a5

Please sign in to comment.