mirror of
https://github.com/caddyserver/xcaddy.git
synced 2025-01-22 08:36:28 +01:00
Extract correct version when using --with flag to replace Caddy core (#216)
This commit is contained in:
parent
c548f44e2d
commit
c0aca26dd2
1 changed files with 4 additions and 0 deletions
|
@ -107,6 +107,10 @@ func (b Builder) Build(ctx context.Context, outputFile string) error {
|
|||
|
||||
// output looks like: github.com/caddyserver/caddy/v2 v2.7.6
|
||||
version := strings.TrimSpace(strings.TrimPrefix(buffer.String(), buildEnv.caddyModulePath))
|
||||
index := strings.Index(version, "=>")
|
||||
if index != -1 {
|
||||
version = strings.TrimSpace(version[:index])
|
||||
}
|
||||
err = utils.WindowsResource(version, outputFile, buildEnv.tempFolder)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Loading…
Reference in a new issue