Music Pipeline Implementation
This commit is contained in:
@@ -117,7 +117,7 @@ func ValidateProject(p *project.Project) Report {
|
||||
}
|
||||
|
||||
for _, rel := range p.Inventory.AssetFiles {
|
||||
if hasUppercaseResourceName(rel) {
|
||||
if hasUppercaseResourceName(rel) && !isMusicSourceAsset(rel) {
|
||||
report.add(rel, "resource filenames should be lowercase", SeverityWarning)
|
||||
}
|
||||
base := strings.ToLower(strings.TrimSuffix(filepath.Base(rel), filepath.Ext(rel)))
|
||||
@@ -519,6 +519,19 @@ func hasAsset(name string, extensions []string, assets map[string]string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func isMusicSourceAsset(rel string) bool {
|
||||
rel = filepath.ToSlash(strings.TrimSpace(rel))
|
||||
if rel != "envi/music" && !strings.HasPrefix(rel, "envi/music/") {
|
||||
return false
|
||||
}
|
||||
switch strings.ToLower(filepath.Ext(rel)) {
|
||||
case ".mp3", ".ogg":
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
func isBuiltinScript(name string) bool {
|
||||
lower := strings.ToLower(name)
|
||||
for _, prefix := range builtinScriptPrefixes {
|
||||
|
||||
Reference in New Issue
Block a user