Skip to content

Commit

Permalink
Merge pull request #197 from essentialkaos/develop
Browse files Browse the repository at this point in the history
Version 8.0.3
  • Loading branch information
andyone authored Apr 1, 2024
2 parents b9bebea + 154be97 commit be603db
Show file tree
Hide file tree
Showing 37 changed files with 64 additions and 437 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

strategy:
matrix:
go: [ '1.20.x', '1.21.x' ]
go: [ '1.21.x', '1.22.x' ]

steps:
- name: Checkout
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.20.x'
go-version: '1.21.x'

- name: Download dependencies
run: make deps
Expand Down
2 changes: 1 addition & 1 deletion action/auxi.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package action

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2023 ESSENTIAL KAOS //
// Copyright (c) 2024 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion action/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package action

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2023 ESSENTIAL KAOS //
// Copyright (c) 2024 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion action/basic.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package action

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2023 ESSENTIAL KAOS //
// Copyright (c) 2024 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
6 changes: 3 additions & 3 deletions action/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package action

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2023 ESSENTIAL KAOS //
// Copyright (c) 2024 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down Expand Up @@ -84,8 +84,8 @@ func Owner(action *recipe.Action) error {
return err
}

userName := strutil.ReadField(userAndGroup, 0, false, ":")
groupName := strutil.ReadField(userAndGroup, 1, false, ":")
userName := strutil.ReadField(userAndGroup, 0, false, ':')
groupName := strutil.ReadField(userAndGroup, 1, false, ':')

uid, gid, err := fsutil.GetOwner(target)

Expand Down
2 changes: 1 addition & 1 deletion action/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package action

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2023 ESSENTIAL KAOS //
// Copyright (c) 2024 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion action/io.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package action

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2023 ESSENTIAL KAOS //
// Copyright (c) 2024 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
8 changes: 4 additions & 4 deletions action/libs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package action

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2023 ESSENTIAL KAOS //
// Copyright (c) 2024 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down Expand Up @@ -323,7 +323,7 @@ func isLibLoaded(glob string) (bool, error) {
}

line = strings.TrimSpace(line)
line = strutil.ReadField(line, 0, false, " ")
line = strutil.ReadField(line, 0, false, ' ')

match, _ := filepath.Match(glob, line)

Expand Down Expand Up @@ -403,9 +403,9 @@ func extractSOExports(file string) ([]string, error) {
}

for _, line := range strings.Split(string(output), "\n") {
switch strutil.ReadField(line, 1, false, " ") {
switch strutil.ReadField(line, 1, false, ' ') {
case "T", "R", "D":
result = append(result, strutil.ReadField(line, 2, false, " "))
result = append(result, strutil.ReadField(line, 2, false, ' '))
}
}

Expand Down
2 changes: 1 addition & 1 deletion action/python.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package action

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2023 ESSENTIAL KAOS //
// Copyright (c) 2024 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion action/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package action

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2023 ESSENTIAL KAOS //
// Copyright (c) 2024 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion action/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package action

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2023 ESSENTIAL KAOS //
// Copyright (c) 2024 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion action/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package action

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2023 ESSENTIAL KAOS //
// Copyright (c) 2024 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion action/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package action

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2023 ESSENTIAL KAOS //
// Copyright (c) 2024 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion bibop.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package main

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2023 ESSENTIAL KAOS //
// Copyright (c) 2024 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion cli/barcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package cli

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2023 ESSENTIAL KAOS //
// Copyright (c) 2024 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
24 changes: 17 additions & 7 deletions cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package cli

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2023 ESSENTIAL KAOS //
// Copyright (c) 2024 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand All @@ -21,6 +21,9 @@ import (
"github.com/essentialkaos/ek/v12/options"
"github.com/essentialkaos/ek/v12/req"
"github.com/essentialkaos/ek/v12/strutil"
"github.com/essentialkaos/ek/v12/support"
"github.com/essentialkaos/ek/v12/support/deps"
"github.com/essentialkaos/ek/v12/support/pkgs"
"github.com/essentialkaos/ek/v12/terminal/tty"
"github.com/essentialkaos/ek/v12/usage"
"github.com/essentialkaos/ek/v12/usage/completion/bash"
Expand All @@ -30,7 +33,6 @@ import (
"github.com/essentialkaos/ek/v12/usage/update"

"github.com/essentialkaos/bibop/cli/executor"
"github.com/essentialkaos/bibop/cli/support"
"github.com/essentialkaos/bibop/parser"
"github.com/essentialkaos/bibop/recipe"
"github.com/essentialkaos/bibop/render"
Expand All @@ -41,7 +43,7 @@ import (
// Application info
const (
APP = "bibop"
VER = "8.0.2"
VER = "8.0.3"
DESC = "Utility for testing command-line tools"
)

Expand Down Expand Up @@ -129,7 +131,15 @@ func Run(gitRev string, gomod []byte) {
genAbout(gitRev).Print(options.GetS(OPT_VER))
os.Exit(0)
case options.GetB(OPT_VERB_VER):
support.Print(APP, VER, gitRev, gomod)
support.Collect(APP, VER).
WithRevision(gitRev).
WithDeps(deps.Extract(gomod)).
WithPackages(pkgs.Collect(
"ca-certificates", "systemd", "systemd-sysv",
"initscripts", "libc-bin", "dpkg",
"gcc", "python2", "python3", "binutils",
)).
Print()
os.Exit(0)
case options.GetB(OPT_HELP) || len(args) == 0:
genUsage().Print()
Expand Down Expand Up @@ -495,13 +505,13 @@ func genAbout(gitRev string) *usage.About {
VersionColorTag: colorTagVer,
DescSeparator: "{s}—{!}",

License: "Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0>",
BugTracker: "https://github.com/essentialkaos/bibop/issues",
UpdateChecker: usage.UpdateChecker{"essentialkaos/bibop", update.GitHubChecker},
License: "Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0>",
BugTracker: "https://github.com/essentialkaos/bibop/issues",
}

if gitRev != "" {
about.Build = "git:" + gitRev
about.UpdateChecker = usage.UpdateChecker{"essentialkaos/bibop", update.GitHubChecker}
}

return about
Expand Down
2 changes: 1 addition & 1 deletion cli/executor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package executor

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2023 ESSENTIAL KAOS //
// Copyright (c) 2024 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion cli/executor/validators.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package executor

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2023 ESSENTIAL KAOS //
// Copyright (c) 2024 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
Loading

0 comments on commit be603db

Please sign in to comment.