Resolve prebuilt assets from the selected module
This commit is contained in:
@@ -3,11 +3,24 @@ package artifact
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
)
|
||||
|
||||
const ManifestFilename = "SHA256SUMS"
|
||||
|
||||
// OutputDirectory resolves build output and prebuilt asset directories from
|
||||
// the absolute selected module directory.
|
||||
func OutputDirectory(moduleDir, directory string) string {
|
||||
if directory == "" {
|
||||
directory = "dist"
|
||||
}
|
||||
if !filepath.IsAbs(directory) {
|
||||
directory = filepath.Join(moduleDir, directory)
|
||||
}
|
||||
return filepath.Clean(directory)
|
||||
}
|
||||
|
||||
type Target struct {
|
||||
OS string
|
||||
Arch string
|
||||
|
||||
Reference in New Issue
Block a user