mirror of
https://github.com/kairos-io/immucore.git
synced 2025-08-16 21:27:28 +00:00
Set logger before running the version command (#125)
This commit is contained in:
parent
77d0879ff1
commit
d59fa6789c
10
Earthfile
10
Earthfile
@ -4,11 +4,15 @@ VERSION 0.6
|
|||||||
# Framework images should use our initrd
|
# Framework images should use our initrd
|
||||||
ARG FLAVOR=core-opensuse-leap
|
ARG FLAVOR=core-opensuse-leap
|
||||||
ARG BASE_IMAGE=quay.io/kairos/$FLAVOR
|
ARG BASE_IMAGE=quay.io/kairos/$FLAVOR
|
||||||
ARG OSBUILDER_IMAGE=quay.io/kairos/osbuilder-tools
|
# renovate: datasource=docker depName=quay.io/kairos/osbuilder-tools versioning=semver-coerced
|
||||||
|
ARG OSBUILDER_VERSION=v0.6.4
|
||||||
|
ARG OSBUILDER_IMAGE=quay.io/kairos/osbuilder-tools:$OSBUILDER_VERSION
|
||||||
ARG ISO_NAME=$FLAVOR-immucore
|
ARG ISO_NAME=$FLAVOR-immucore
|
||||||
|
|
||||||
ARG GO_VERSION=1.18
|
# renovate: datasource=docker depName=golang
|
||||||
ARG GOLINT_VERSION=v1.47.3
|
ARG GO_VERSION=1.20
|
||||||
|
# renovate: datasource=docker depName=golangci/golangci-lint
|
||||||
|
ARG GOLINT_VERSION=v1.52.2
|
||||||
|
|
||||||
version:
|
version:
|
||||||
FROM alpine
|
FROM alpine
|
||||||
|
@ -15,7 +15,7 @@ import (
|
|||||||
|
|
||||||
// YipLayoutPlugin is the immucore implementation of Layout yip's plugin based
|
// YipLayoutPlugin is the immucore implementation of Layout yip's plugin based
|
||||||
// on partitioner package.
|
// on partitioner package.
|
||||||
func YipLayoutPlugin(l logger.Interface, s schema.Stage, fs vfs.FS, console plugins.Console) (err error) {
|
func YipLayoutPlugin(l logger.Interface, s schema.Stage, _ vfs.FS, _ plugins.Console) (err error) {
|
||||||
if s.Layout.Device == nil {
|
if s.Layout.Device == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
1
main.go
1
main.go
@ -82,6 +82,7 @@ func main() {
|
|||||||
Name: "version",
|
Name: "version",
|
||||||
Usage: "version",
|
Usage: "version",
|
||||||
Action: func(c *cli.Context) error {
|
Action: func(c *cli.Context) error {
|
||||||
|
utils.SetLogger()
|
||||||
v := version.Get()
|
v := version.Get()
|
||||||
utils.Log.Info().Str("commit", v.GitCommit).Str("compiled with", v.GoVersion).Str("version", v.Version).Msg("Immucore")
|
utils.Log.Info().Str("commit", v.GitCommit).Str("compiled with", v.GoVersion).Str("version", v.Version).Msg("Immucore")
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user