mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
Make the hugo env non verbose output slightly more verbose
This is how it may look like with a extended build: ``` hugo v0.107.0-6445b1e9ff963b07c55d9d69cb9abef8ef21fc5d+extended darwin/arm64 BuildDate=2022-12-06T11:21:50Z GOOS="darwin" GOARCH="arm64" GOVERSION="go1.19.3" github.com/sass/libsass="3.6.5" github.com/webmproject/libwebp="v1.2.4" github.com/sass/dart-sass-embedded/protocol="1.1.0" github.com/sass/dart-sass-embedded/compiler="1.56.1" github.com/sass/dart-sass-embedded/implementation="1.56.1" ```
This commit is contained in:
parent
d8efe085ca
commit
f97544a830
2 changed files with 30 additions and 16 deletions
|
@ -50,6 +50,14 @@ If you add the -v flag, you will get a full dependency list.
|
||||||
for _, dep := range deps {
|
for _, dep := range deps {
|
||||||
jww.FEEDBACK.Printf("%s\n", dep)
|
jww.FEEDBACK.Printf("%s\n", dep)
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// These are also included in the GetDependencyList above;
|
||||||
|
// always print these as these are most likely the most useful to know about.
|
||||||
|
deps := hugo.GetDependencyListNonGo()
|
||||||
|
for _, dep := range deps {
|
||||||
|
jww.FEEDBACK.Printf("%s\n", dep)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
|
@ -186,19 +186,38 @@ func getBuildInfo() *buildInfo {
|
||||||
return bInfo
|
return bInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func formatDep(path, version string) string {
|
||||||
|
return fmt.Sprintf("%s=%q", path, version)
|
||||||
|
}
|
||||||
|
|
||||||
// GetDependencyList returns a sorted dependency list on the format package="version".
|
// GetDependencyList returns a sorted dependency list on the format package="version".
|
||||||
// It includes both Go dependencies and (a manually maintained) list of C(++) dependencies.
|
// It includes both Go dependencies and (a manually maintained) list of C(++) dependencies.
|
||||||
func GetDependencyList() []string {
|
func GetDependencyList() []string {
|
||||||
var deps []string
|
var deps []string
|
||||||
|
|
||||||
formatDep := func(path, version string) string {
|
bi := getBuildInfo()
|
||||||
return fmt.Sprintf("%s=%q", path, version)
|
if bi == nil {
|
||||||
|
return deps
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for _, dep := range bi.Deps {
|
||||||
|
deps = append(deps, formatDep(dep.Path, dep.Version))
|
||||||
|
}
|
||||||
|
|
||||||
|
deps = append(deps, GetDependencyListNonGo()...)
|
||||||
|
|
||||||
|
sort.Strings(deps)
|
||||||
|
|
||||||
|
return deps
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetDependencyListNonGo returns a list of non-Go dependencies.
|
||||||
|
func GetDependencyListNonGo() []string {
|
||||||
|
var deps []string
|
||||||
|
|
||||||
if IsExtended {
|
if IsExtended {
|
||||||
deps = append(
|
deps = append(
|
||||||
deps,
|
deps,
|
||||||
// TODO(bep) consider adding a DepsNonGo() method to these upstream projects.
|
|
||||||
formatDep("github.com/sass/libsass", "3.6.5"),
|
formatDep("github.com/sass/libsass", "3.6.5"),
|
||||||
formatDep("github.com/webmproject/libwebp", "v1.2.4"),
|
formatDep("github.com/webmproject/libwebp", "v1.2.4"),
|
||||||
)
|
)
|
||||||
|
@ -211,20 +230,7 @@ func GetDependencyList() []string {
|
||||||
formatDep(dartSassPath+"/compiler", dartSass.CompilerVersion),
|
formatDep(dartSassPath+"/compiler", dartSass.CompilerVersion),
|
||||||
formatDep(dartSassPath+"/implementation", dartSass.ImplementationVersion),
|
formatDep(dartSassPath+"/implementation", dartSass.ImplementationVersion),
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bi := getBuildInfo()
|
|
||||||
if bi == nil {
|
|
||||||
return deps
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, dep := range bi.Deps {
|
|
||||||
deps = append(deps, formatDep(dep.Path, dep.Version))
|
|
||||||
}
|
|
||||||
|
|
||||||
sort.Strings(deps)
|
|
||||||
|
|
||||||
return deps
|
return deps
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue