4a6c2e2a9c
This also fixes the build order. Unfortunately we need to ensure that the web frontends are built before installing Go binaries. Fixes https://github.com/storj/storj/issues/4654 Change-Id: I5d1c83125fd3d1a454d3400b2cbdd44bd3f2250c
23 lines
390 B
Go
23 lines
390 B
Go
// Copyright (C) 2022 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
package adminui
|
|
|
|
import (
|
|
"embed"
|
|
"fmt"
|
|
"io/fs"
|
|
)
|
|
|
|
//go:embed build/*
|
|
var assets embed.FS
|
|
|
|
// Assets contains either the built admin/ui or it is empty.
|
|
var Assets = func() fs.FS {
|
|
build, err := fs.Sub(assets, "build")
|
|
if err != nil {
|
|
panic(fmt.Errorf("invalid embedding: %w", err))
|
|
}
|
|
return build
|
|
}()
|