sbom-utility: 0.17.0 -> 0.18.1
Allows to drop previously used in-tree patches. Signed-off-by: Markus Theil <theil.markus@gmail.com>
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
diff --git a/cmd/root.go b/cmd/root.go
|
||||
index 5ef5d46..e99b245 100644
|
||||
--- a/cmd/root.go
|
||||
+++ b/cmd/root.go
|
||||
@@ -139,7 +139,7 @@ const (
|
||||
)
|
||||
|
||||
var rootCmd = &cobra.Command{
|
||||
- Use: fmt.Sprintf("%s [command] [flags]", utils.GlobalFlags.Project),
|
||||
+ Use: fmt.Sprintf("sbom-utility [command] [flags]"),
|
||||
SilenceErrors: false,
|
||||
SilenceUsage: false,
|
||||
Short: MSG_APP_NAME,
|
||||
@@ -9,7 +9,7 @@
|
||||
}:
|
||||
|
||||
let
|
||||
version = "0.17.0";
|
||||
version = "0.18.1";
|
||||
in
|
||||
buildGoModule {
|
||||
pname = "sbom-utility";
|
||||
@@ -19,21 +19,11 @@ buildGoModule {
|
||||
owner = "CycloneDX";
|
||||
repo = "sbom-utility";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-LiHCA5q9IJ67jZ2JUcbCFVCYnT36nyq9QzgH9PMr9kM=";
|
||||
hash = "sha256-LIyr9qu4FQ85EBWzNncztURy1U02VnLMCwEjHwCJvUM=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-vyYSir5u6d5nv+2ScrHpasQGER4VFSoLb1FDUDIrtDM=";
|
||||
|
||||
patches = [
|
||||
# work around https://github.com/CycloneDX/sbom-utility/issues/121, which otherwise
|
||||
# breaks shell completions
|
||||
./name.patch
|
||||
# Output logs to stderr rather than stdout.
|
||||
# Patch of https://github.com/CycloneDX/sbom-utility/pull/122, adapted to apply
|
||||
# against v0.17.0
|
||||
./stderr.patch
|
||||
];
|
||||
|
||||
ldflags = [
|
||||
"-X main.Version=${version}"
|
||||
];
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
diff --git a/log/log.go b/log/log.go
|
||||
index 2615f0a..c82b6c5 100644
|
||||
--- a/log/log.go
|
||||
+++ b/log/log.go
|
||||
@@ -104,7 +104,7 @@ func NewDefaultLogger() *MiniLogger {
|
||||
tagEnter: DEFAULT_ENTER_TAG,
|
||||
tagExit: DEFAULT_EXIT_TAG,
|
||||
tagColor: color.New(color.FgMagenta),
|
||||
- outputFile: os.Stdout,
|
||||
+ outputFile: os.Stderr,
|
||||
maxStrLength: 64,
|
||||
}
|
||||
|
||||
@@ -361,7 +361,7 @@ func (log MiniLogger) dumpInterface(lvl Level, tag string, value interface{}, sk
|
||||
}
|
||||
|
||||
// TODO: use a general output writer (set to stdout, stderr, or file stream)
|
||||
- fmt.Println(sb.String())
|
||||
+ fmt.Fprintln(log.outputFile, sb.String())
|
||||
} else {
|
||||
os.Stderr.WriteString("Error: Unable to retrieve call stack. Exiting...")
|
||||
os.Exit(-2)
|
||||
@@ -370,7 +370,7 @@ func (log MiniLogger) dumpInterface(lvl Level, tag string, value interface{}, sk
|
||||
}
|
||||
|
||||
func (log MiniLogger) DumpString(value string) {
|
||||
- fmt.Print(value)
|
||||
+ fmt.Fprint(log.outputFile, value)
|
||||
}
|
||||
|
||||
func (log MiniLogger) DumpStruct(structName string, field interface{}) error {
|
||||
@@ -389,7 +389,7 @@ func (log MiniLogger) DumpStruct(structName string, field interface{}) error {
|
||||
}
|
||||
|
||||
// TODO: print to output stream
|
||||
- fmt.Println(sb.String())
|
||||
+ fmt.Fprintln(log.outputFile, sb.String())
|
||||
|
||||
return nil
|
||||
}
|
||||
@@ -398,8 +398,8 @@ func (log MiniLogger) DumpArgs() {
|
||||
args := os.Args
|
||||
for i, a := range args {
|
||||
// TODO: print to output stream
|
||||
- fmt.Print(log.indentRunes)
|
||||
- fmt.Printf("os.Arg[%d]: `%v`\n", i, a)
|
||||
+ fmt.Fprint(log.outputFile, log.indentRunes)
|
||||
+ fmt.Fprintf(log.outputFile, "os.Arg[%d]: `%v`\n", i, a)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -409,7 +409,7 @@ func (log MiniLogger) DumpSeparator(sep byte, repeat int) (string, error) {
|
||||
for i := 0; i < repeat; i++ {
|
||||
sb.WriteByte(sep)
|
||||
}
|
||||
- fmt.Println(sb.String())
|
||||
+ fmt.Fprintln(log.outputFile, sb.String())
|
||||
return sb.String(), nil
|
||||
} else {
|
||||
return "", errors.New("invalid repeat length (>80)")
|
||||
@@ -417,5 +417,5 @@ func (log MiniLogger) DumpSeparator(sep byte, repeat int) (string, error) {
|
||||
}
|
||||
|
||||
func (log *MiniLogger) DumpStackTrace() {
|
||||
- fmt.Println(string(debug.Stack()))
|
||||
+ fmt.Fprintln(log.outputFile, string(debug.Stack()))
|
||||
}
|
||||
Reference in New Issue
Block a user