Skip to content

Commit

Permalink
Merge pull request #231 from essentialkaos/develop
Browse files Browse the repository at this point in the history
Version 8.1.2
  • Loading branch information
andyone authored Nov 18, 2024
2 parents d2da9aa + 48e41e9 commit fb2bf87
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 46 deletions.
10 changes: 0 additions & 10 deletions .codebeatsettings

This file was deleted.

4 changes: 2 additions & 2 deletions .docker/ol8.docker
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## REGISTRY CONFIGURATION ######################################################

ARG REGISTRY="docker.io"
ARG REGISTRY="ghcr.io"

## BUILDER #####################################################################

FROM ${REGISTRY}/essentialkaos/golang:ol8 as builder
FROM ${REGISTRY}/essentialkaos/golang:ol8 AS builder

RUN mkdir -p "/go/src" && chmod -R 777 "/go"

Expand Down
4 changes: 2 additions & 2 deletions .docker/ol9.docker
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## REGISTRY CONFIGURATION ######################################################

ARG REGISTRY="docker.io"
ARG REGISTRY="ghcr.io"

## BUILDER #####################################################################

FROM ${REGISTRY}/essentialkaos/golang:ol9 as builder
FROM ${REGISTRY}/essentialkaos/golang:ol9 AS builder

RUN mkdir -p "/go/src" && chmod -R 777 "/go"

Expand Down
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ updates:
schedule:
interval: "daily"
timezone: "Etc/UTC"
time: "07:00"
time: "03:00"
labels:
- "PR • MAINTENANCE"
assignees:
Expand All @@ -27,7 +27,7 @@ updates:
schedule:
interval: "daily"
timezone: "Etc/UTC"
time: "08:00"
time: "03:00"
labels:
- "PR • MAINTENANCE"
assignees:
Expand Down
18 changes: 14 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################################################################################

# This Makefile generated by GoMakeGen 3.0.2 using next command:
# This Makefile generated by GoMakeGen 3.2.1 using next command:
# gomakegen --mod .
#
# More info: https://kaos.sh/gomakegen
Expand All @@ -11,7 +11,16 @@ ifdef VERBOSE ## Print verbose information (Flag)
VERBOSE_FLAG = -v
endif

COMPAT ?= 1.19
ifdef PROXY ## Force proxy usage for downloading dependencies (Flag)
export GOPROXY=https://proxy.golang.org/cached-only,direct
endif

ifdef CGO ## Enable CGO usage (Flag)
export CGO_ENABLED=1
else
export CGO_ENABLED=0
endif

MAKEDIR = $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
GITREV ?= $(shell test -s $(MAKEDIR)/.git && git rev-parse --short HEAD)

Expand Down Expand Up @@ -53,7 +62,7 @@ else
endif

gen-fuzz: ## Generate archives for fuzz testing
@which go-fuzz-build &>/dev/null || go get -u -v github.com/dvyukov/go-fuzz/go-fuzz-build
@which go-fuzz-build &>/dev/null || go install github.com/dvyukov/go-fuzz/go-fuzz-build@latest
@echo "Generating fuzzing data…"
@go-fuzz-build -o parser-fuzz.zip github.com/essentialkaos/bibop/parser

Expand Down Expand Up @@ -120,8 +129,9 @@ help: ## Show this info
@echo -e '\n\033[1mVariables:\033[0m\n'
@grep -E '^ifdef [A-Z_]+ .*?## .*$$' $(abspath $(lastword $(MAKEFILE_LIST))) \
| sed 's/ifdef //' \
| sort -h \
| awk 'BEGIN {FS = " .*?## "}; {printf " \033[32m%-13s\033[0m %s\n", $$1, $$2}'
@echo -e ''
@echo -e '\033[90mGenerated by GoMakeGen 3.0.2\033[0m\n'
@echo -e '\033[90mGenerated by GoMakeGen 3.2.1\033[0m\n'

################################################################################
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<p align="center">
<a href="https://kaos.sh/r/bibop"><img src="https://kaos.sh/r/bibop.svg" alt="GoReportCard" /></a>
<a href="https://kaos.sh/l/bibop"><img src="https://kaos.sh/l/d306c6b094eae9f6ade7.svg" alt="Code Climate Maintainability" /></a>
<a href="https://kaos.sh/b/bibop"><img src="https://kaos.sh/b/a03d5074-eea9-48a7-848c-dacbe7a9bf04.svg" alt="codebeat badge" /></a>
<a href="https://kaos.sh/y/bibop"><img src="https://kaos.sh/y/892b9659ae8e4a5495bd9f8971bb31a2.svg" alt="Codacy badge" /></a>
<br/>
<a href="https://kaos.sh/w/bibop/ci-push"><img src="https://kaos.sh/w/bibop/ci-push.svg" alt="GitHub Actions CI Status" /></a>
Expand All @@ -28,7 +27,7 @@ https://github.com/essentialkaos/bibop/assets/182020/c63dc147-fa44-40df-92e2-12f

#### From source

To build the `bibop` from scratch, make sure you have a working Go 1.22+ workspace ([instructions](https://go.dev/doc/install)), then:
To build the `bibop` from scratch, make sure you have a working Go [1.22+](https://github.com/essentialkaos/.github/blob/master/GO-VERSION-SUPPORT.md) workspace ([instructions](https://go.dev/doc/install)), then:

```
go install github.com/essentialkaos/bibop@latest
Expand Down
6 changes: 4 additions & 2 deletions cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"github.com/essentialkaos/ek/v13/support"
"github.com/essentialkaos/ek/v13/support/deps"
"github.com/essentialkaos/ek/v13/support/pkgs"
"github.com/essentialkaos/ek/v13/support/resources"
"github.com/essentialkaos/ek/v13/terminal"
"github.com/essentialkaos/ek/v13/terminal/tty"
"github.com/essentialkaos/ek/v13/usage"
Expand All @@ -44,7 +45,7 @@ import (
// Application info
const (
APP = "bibop"
VER = "8.1.1"
VER = "8.1.2"
DESC = "Utility for testing command-line tools"
)

Expand Down Expand Up @@ -117,7 +118,7 @@ func Run(gitRev string, gomod []byte) {

if !errs.IsEmpty() {
terminal.Error("Options parsing errors:")
terminal.Error(errs.String())
terminal.Error(errs.Error("- "))
os.Exit(1)
}

Expand All @@ -141,6 +142,7 @@ func Run(gitRev string, gomod []byte) {
"initscripts", "libc-bin", "dpkg",
"gcc", "python2", "python3", "binutils",
)).
WithResources(resources.Collect()).
Print()
os.Exit(0)
case options.GetB(OPT_HELP) || len(args) == 0:
Expand Down
6 changes: 3 additions & 3 deletions cli/executor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"syscall"
"time"

"github.com/essentialkaos/ek/v13/errutil"
"github.com/essentialkaos/ek/v13/errors"
"github.com/essentialkaos/ek/v13/fmtc"
"github.com/essentialkaos/ek/v13/fmtutil/panel"
"github.com/essentialkaos/ek/v13/fsutil"
Expand Down Expand Up @@ -162,7 +162,7 @@ func NewExecutor(cfg *Config) *Executor {

// Validate validates recipe
func (e *Executor) Validate(r *recipe.Recipe, cfg *ValidationConfig) []error {
errs := errutil.NewErrors()
errs := errors.NewBundle()

errs.Add(checkRecipeWorkingDir(r))
errs.Add(checkRecipeTags(r, cfg.Tags))
Expand All @@ -180,7 +180,7 @@ func (e *Executor) Validate(r *recipe.Recipe, cfg *ValidationConfig) []error {
errs.Add(checkDependencies(r))
}

if !errs.HasErrors() {
if errs.IsEmpty() {
return nil
}

Expand Down
14 changes: 7 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
module github.com/essentialkaos/bibop

go 1.21
go 1.22.8

require (
github.com/buger/jsonparser v1.1.1
github.com/creack/pty v1.1.23
github.com/essentialkaos/check v1.4.0
github.com/essentialkaos/ek/v13 v13.3.5
github.com/creack/pty v1.1.24
github.com/essentialkaos/check v1.4.1
github.com/essentialkaos/ek/v13 v13.12.0
)

require (
github.com/essentialkaos/depsy v1.3.0 // indirect
github.com/essentialkaos/depsy v1.3.1 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
golang.org/x/sys v0.24.0 // indirect
github.com/rogpeppe/go-internal v1.13.1 // indirect
golang.org/x/sys v0.27.0 // indirect
)
24 changes: 12 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs=
github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/creack/pty v1.1.23 h1:4M6+isWdcStXEf15G/RbrMPOQj1dZ7HPZCGwE4kOeP0=
github.com/creack/pty v1.1.23/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE=
github.com/essentialkaos/check v1.4.0 h1:kWdFxu9odCxUqo1NNFNJmguGrDHgwi3A8daXX1nkuKk=
github.com/essentialkaos/check v1.4.0/go.mod h1:LMKPZ2H+9PXe7Y2gEoKyVAwUqXVgx7KtgibfsHJPus0=
github.com/essentialkaos/depsy v1.3.0 h1:CN7bRgBU2jGTHSkg/Sh38eDUn7cvmaTp2sxFt2HpFeU=
github.com/essentialkaos/depsy v1.3.0/go.mod h1:kpiTAV17dyByVnrbNaMcZt2jRwvuXClUYOzpyJQwtG8=
github.com/essentialkaos/ek/v13 v13.3.5 h1:k/lfDIpgE+8dOc+eF37m1hOi8eEMHYYTEzD5KHH3xxU=
github.com/essentialkaos/ek/v13 v13.3.5/go.mod h1:FWHXQ74YiSCsi/H9kmHR68fUE8aYUNcp0Fzz98XGUtM=
github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s=
github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE=
github.com/essentialkaos/check v1.4.1 h1:SuxXzrbokPGTPWxGRnzy0hXvtb44mtVrdNxgPa1s4c8=
github.com/essentialkaos/check v1.4.1/go.mod h1:xQOYwFvnxfVZyt5Qvjoa1SxcRqu5VyP77pgALr3iu+M=
github.com/essentialkaos/depsy v1.3.1 h1:00k9QcMsdPM4IzDaEFHsTHBD/zoM0oxtB5+dMUwbQa8=
github.com/essentialkaos/depsy v1.3.1/go.mod h1:B5+7Jhv2a2RacOAxIKU2OeJp9QfZjwIpEEPI5X7auWM=
github.com/essentialkaos/ek/v13 v13.12.0 h1:NV5pZWzD2vIMBDoTihAwFRoLuN2xV6ie47unhS/H8nc=
github.com/essentialkaos/ek/v13 v13.12.0/go.mod h1:GAoS44v5gtd3Yc1qqfgXsaJNoC0dMw1ueW5Fc9TTHUg=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg=
golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s=
golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=

0 comments on commit fb2bf87

Please sign in to comment.