|
|
@@ -7345,7 +7345,7 @@ func TestApplyAutogenConsumersAugmentsHeadVisualeffectsFromLocalOverride(t *test
|
|
|
|
Root: "vfxs",
|
|
|
|
Root: "vfxs",
|
|
|
|
Include: []string{"head_accessories/**/*.mdl", "head_decorations/**/*.mdl", "head_features/**/*.mdl"},
|
|
|
|
Include: []string{"head_accessories/**/*.mdl", "head_decorations/**/*.mdl", "head_features/**/*.mdl"},
|
|
|
|
Derive: project.AutogenDeriveConfig{Kind: "model_stem", GroupFrom: "first_path_segment"},
|
|
|
|
Derive: project.AutogenDeriveConfig{Kind: "model_stem", GroupFrom: "first_path_segment"},
|
|
|
|
Manifest: project.AutogenManifestConfig{ReleaseTag: "head-vfx-manifest-current", AssetName: "sow-head-vfx-manifest.json", CacheName: "sow-head-vfx-manifest.json"},
|
|
|
|
Manifest: project.AutogenManifestConfig{ReleaseTag: "head-vfx-manifest-current", AssetName: "sow-accessory-vfx-manifest.json", CacheName: "sow-accessory-vfx-manifest.json"},
|
|
|
|
LocalOverrideRoot: "autogen-assets",
|
|
|
|
LocalOverrideRoot: "autogen-assets",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
@@ -7425,7 +7425,7 @@ func TestApplyAutogenConsumersUsesFolderDrivenSlashHeadVisualeffectsNames(t *tes
|
|
|
|
Root: "vfxs",
|
|
|
|
Root: "vfxs",
|
|
|
|
Include: []string{"head_features/**/*.mdl"},
|
|
|
|
Include: []string{"head_features/**/*.mdl"},
|
|
|
|
Derive: project.AutogenDeriveConfig{Kind: "model_stem", GroupFrom: "first_path_segment"},
|
|
|
|
Derive: project.AutogenDeriveConfig{Kind: "model_stem", GroupFrom: "first_path_segment"},
|
|
|
|
Manifest: project.AutogenManifestConfig{ReleaseTag: "head-vfx-manifest-current", AssetName: "sow-head-vfx-manifest.json", CacheName: "sow-head-vfx-manifest.json"},
|
|
|
|
Manifest: project.AutogenManifestConfig{ReleaseTag: "head-vfx-manifest-current", AssetName: "sow-accessory-vfx-manifest.json", CacheName: "sow-accessory-vfx-manifest.json"},
|
|
|
|
LocalOverrideRoot: "autogen-assets",
|
|
|
|
LocalOverrideRoot: "autogen-assets",
|
|
|
|
HeadVisualeffects: project.HeadVisualeffectsConfig{
|
|
|
|
HeadVisualeffects: project.HeadVisualeffectsConfig{
|
|
|
|
Groups: map[string]project.HeadVisualeffectGroupConfig{
|
|
|
|
Groups: map[string]project.HeadVisualeffectGroupConfig{
|
|
|
@@ -7522,8 +7522,8 @@ autogen:
|
|
|
|
group_from: first_path_segment
|
|
|
|
group_from: first_path_segment
|
|
|
|
manifest:
|
|
|
|
manifest:
|
|
|
|
release_tag: head-vfx-manifest-current
|
|
|
|
release_tag: head-vfx-manifest-current
|
|
|
|
asset_name: sow-head-vfx-manifest.json
|
|
|
|
asset_name: sow-accessory-vfx-manifest.json
|
|
|
|
cache_name: sow-head-vfx-manifest.json
|
|
|
|
cache_name: sow-accessory-vfx-manifest.json
|
|
|
|
local_override_root: autogen-assets
|
|
|
|
local_override_root: autogen-assets
|
|
|
|
accessory_visualeffects:
|
|
|
|
accessory_visualeffects:
|
|
|
|
groups:
|
|
|
|
groups:
|
|
|
@@ -12847,8 +12847,8 @@ func TestBuildNativeWithReleasedHeadVisualeffectsManifest(t *testing.T) {
|
|
|
|
switch r.URL.Path {
|
|
|
|
switch r.URL.Path {
|
|
|
|
case "/api/v1/repos/ShadowsOverWestgate/sow-assets/releases/tags/head-vfx-manifest-current":
|
|
|
|
case "/api/v1/repos/ShadowsOverWestgate/sow-assets/releases/tags/head-vfx-manifest-current":
|
|
|
|
w.Header().Set("Content-Type", "application/json")
|
|
|
|
w.Header().Set("Content-Type", "application/json")
|
|
|
|
_, _ = w.Write([]byte(`{"assets":[{"name":"sow-head-vfx-manifest.json","browser_download_url":"` + server.URL + `/downloads/sow-head-vfx-manifest.json"}]}`))
|
|
|
|
_, _ = w.Write([]byte(`{"assets":[{"name":"sow-accessory-vfx-manifest.json","browser_download_url":"` + server.URL + `/downloads/sow-accessory-vfx-manifest.json"}]}`))
|
|
|
|
case "/downloads/sow-head-vfx-manifest.json":
|
|
|
|
case "/downloads/sow-accessory-vfx-manifest.json":
|
|
|
|
w.Header().Set("Content-Type", "application/json")
|
|
|
|
w.Header().Set("Content-Type", "application/json")
|
|
|
|
_, _ = w.Write([]byte(manifestJSON))
|
|
|
|
_, _ = w.Write([]byte(manifestJSON))
|
|
|
|
default:
|
|
|
|
default:
|
|
|
@@ -12884,8 +12884,8 @@ func TestBuildNativeWithReleasedHeadVisualeffectsManifest(t *testing.T) {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Manifest: project.AutogenManifestConfig{
|
|
|
|
Manifest: project.AutogenManifestConfig{
|
|
|
|
ReleaseTag: "head-vfx-manifest-current",
|
|
|
|
ReleaseTag: "head-vfx-manifest-current",
|
|
|
|
AssetName: "sow-head-vfx-manifest.json",
|
|
|
|
AssetName: "sow-accessory-vfx-manifest.json",
|
|
|
|
CacheName: "sow-head-vfx-manifest.json",
|
|
|
|
CacheName: "sow-accessory-vfx-manifest.json",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
@@ -12937,7 +12937,7 @@ func TestBuildNativePrefersRemoteReleasedHeadVisualeffectsManifestOverFreshCache
|
|
|
|
mkdirAll(t, filepath.Join(projRoot, "reference"))
|
|
|
|
mkdirAll(t, filepath.Join(projRoot, "reference"))
|
|
|
|
writeFile(t, filepath.Join(projRoot, "reference", "build.py"), "print('ok')\n")
|
|
|
|
writeFile(t, filepath.Join(projRoot, "reference", "build.py"), "print('ok')\n")
|
|
|
|
|
|
|
|
|
|
|
|
cachePath := filepath.Join(projRoot, ".cache", "sow-head-vfx-manifest.json")
|
|
|
|
cachePath := filepath.Join(projRoot, ".cache", "sow-accessory-vfx-manifest.json")
|
|
|
|
writeFile(t, cachePath, `{
|
|
|
|
writeFile(t, cachePath, `{
|
|
|
|
"id": "accessory_visualeffects",
|
|
|
|
"id": "accessory_visualeffects",
|
|
|
|
"generated_at": "2026-04-25T00:00:00Z",
|
|
|
|
"generated_at": "2026-04-25T00:00:00Z",
|
|
|
@@ -12971,8 +12971,8 @@ func TestBuildNativePrefersRemoteReleasedHeadVisualeffectsManifestOverFreshCache
|
|
|
|
switch r.URL.Path {
|
|
|
|
switch r.URL.Path {
|
|
|
|
case "/api/v1/repos/ShadowsOverWestgate/sow-assets/releases/tags/head-vfx-manifest-current":
|
|
|
|
case "/api/v1/repos/ShadowsOverWestgate/sow-assets/releases/tags/head-vfx-manifest-current":
|
|
|
|
w.Header().Set("Content-Type", "application/json")
|
|
|
|
w.Header().Set("Content-Type", "application/json")
|
|
|
|
_, _ = w.Write([]byte(`{"assets":[{"name":"sow-head-vfx-manifest.json","updated_at":"2026-04-25T12:00:00Z","browser_download_url":"` + server.URL + `/downloads/sow-head-vfx-manifest.json"}]}`))
|
|
|
|
_, _ = w.Write([]byte(`{"assets":[{"name":"sow-accessory-vfx-manifest.json","updated_at":"2026-04-25T12:00:00Z","browser_download_url":"` + server.URL + `/downloads/sow-accessory-vfx-manifest.json"}]}`))
|
|
|
|
case "/downloads/sow-head-vfx-manifest.json":
|
|
|
|
case "/downloads/sow-accessory-vfx-manifest.json":
|
|
|
|
w.Header().Set("Content-Type", "application/json")
|
|
|
|
w.Header().Set("Content-Type", "application/json")
|
|
|
|
_, _ = w.Write([]byte(manifestJSON))
|
|
|
|
_, _ = w.Write([]byte(manifestJSON))
|
|
|
|
default:
|
|
|
|
default:
|
|
|
@@ -13008,8 +13008,8 @@ func TestBuildNativePrefersRemoteReleasedHeadVisualeffectsManifestOverFreshCache
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Manifest: project.AutogenManifestConfig{
|
|
|
|
Manifest: project.AutogenManifestConfig{
|
|
|
|
ReleaseTag: "head-vfx-manifest-current",
|
|
|
|
ReleaseTag: "head-vfx-manifest-current",
|
|
|
|
AssetName: "sow-head-vfx-manifest.json",
|
|
|
|
AssetName: "sow-accessory-vfx-manifest.json",
|
|
|
|
CacheName: "sow-head-vfx-manifest.json",
|
|
|
|
CacheName: "sow-accessory-vfx-manifest.json",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
@@ -13051,7 +13051,7 @@ func TestBuildPackageInvalidatesFreshAutogenCacheWhenReleaseAssetIsNewer(t *test
|
|
|
|
setTopDataSourceTimes(t, root, sourceTime)
|
|
|
|
setTopDataSourceTimes(t, root, sourceTime)
|
|
|
|
setCompiledOutputTimes(t, result, outputTime)
|
|
|
|
setCompiledOutputTimes(t, result, outputTime)
|
|
|
|
|
|
|
|
|
|
|
|
cachePath := filepath.Join(root, ".cache", "sow-head-vfx-manifest.json")
|
|
|
|
cachePath := filepath.Join(root, ".cache", "sow-accessory-vfx-manifest.json")
|
|
|
|
writeFile(t, cachePath, `{"id":"accessory_visualeffects","generated_at":"2026-04-25T10:00:00Z","entries":[{"group":"head_accessories","model_stem":"hfx_bandana","source":"head_accessories/hfx_bandana.mdl"}]}`+"\n")
|
|
|
|
writeFile(t, cachePath, `{"id":"accessory_visualeffects","generated_at":"2026-04-25T10:00:00Z","entries":[{"group":"head_accessories","model_stem":"hfx_bandana","source":"head_accessories/hfx_bandana.mdl"}]}`+"\n")
|
|
|
|
setFileTime(t, cachePath, time.Now())
|
|
|
|
setFileTime(t, cachePath, time.Now())
|
|
|
|
|
|
|
|
|
|
|
@@ -13060,8 +13060,8 @@ func TestBuildPackageInvalidatesFreshAutogenCacheWhenReleaseAssetIsNewer(t *test
|
|
|
|
switch r.URL.Path {
|
|
|
|
switch r.URL.Path {
|
|
|
|
case "/api/v1/repos/ShadowsOverWestgate/sow-assets/releases/tags/head-vfx-manifest-current":
|
|
|
|
case "/api/v1/repos/ShadowsOverWestgate/sow-assets/releases/tags/head-vfx-manifest-current":
|
|
|
|
w.Header().Set("Content-Type", "application/json")
|
|
|
|
w.Header().Set("Content-Type", "application/json")
|
|
|
|
_, _ = w.Write([]byte(`{"assets":[{"name":"sow-head-vfx-manifest.json","updated_at":"3026-04-25T12:00:00Z","browser_download_url":"` + server.URL + `/downloads/sow-head-vfx-manifest.json"}]}`))
|
|
|
|
_, _ = w.Write([]byte(`{"assets":[{"name":"sow-accessory-vfx-manifest.json","updated_at":"3026-04-25T12:00:00Z","browser_download_url":"` + server.URL + `/downloads/sow-accessory-vfx-manifest.json"}]}`))
|
|
|
|
case "/downloads/sow-head-vfx-manifest.json":
|
|
|
|
case "/downloads/sow-accessory-vfx-manifest.json":
|
|
|
|
w.Header().Set("Content-Type", "application/json")
|
|
|
|
w.Header().Set("Content-Type", "application/json")
|
|
|
|
_, _ = w.Write([]byte(`{"id":"accessory_visualeffects","entries":[{"group":"head_accessories","model_stem":"hfx_bandana","source":"head_accessories/hfx_bandana.mdl"}]}`))
|
|
|
|
_, _ = w.Write([]byte(`{"id":"accessory_visualeffects","entries":[{"group":"head_accessories","model_stem":"hfx_bandana","source":"head_accessories/hfx_bandana.mdl"}]}`))
|
|
|
|
default:
|
|
|
|
default:
|
|
|
@@ -13088,8 +13088,8 @@ func TestBuildPackageInvalidatesFreshAutogenCacheWhenReleaseAssetIsNewer(t *test
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Manifest: project.AutogenManifestConfig{
|
|
|
|
Manifest: project.AutogenManifestConfig{
|
|
|
|
ReleaseTag: "head-vfx-manifest-current",
|
|
|
|
ReleaseTag: "head-vfx-manifest-current",
|
|
|
|
AssetName: "sow-head-vfx-manifest.json",
|
|
|
|
AssetName: "sow-accessory-vfx-manifest.json",
|
|
|
|
CacheName: "sow-head-vfx-manifest.json",
|
|
|
|
CacheName: "sow-accessory-vfx-manifest.json",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
@@ -13413,12 +13413,12 @@ func TestBuildPackageFailsWhenAutogenManifestCacheIsStale(t *testing.T) {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Manifest: project.AutogenManifestConfig{
|
|
|
|
Manifest: project.AutogenManifestConfig{
|
|
|
|
ReleaseTag: "head-vfx-manifest-current",
|
|
|
|
ReleaseTag: "head-vfx-manifest-current",
|
|
|
|
AssetName: "sow-head-vfx-manifest.json",
|
|
|
|
AssetName: "sow-accessory-vfx-manifest.json",
|
|
|
|
CacheName: "sow-head-vfx-manifest.json",
|
|
|
|
CacheName: "sow-accessory-vfx-manifest.json",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
cachePath := filepath.Join(root, ".cache", "sow-head-vfx-manifest.json")
|
|
|
|
cachePath := filepath.Join(root, ".cache", "sow-accessory-vfx-manifest.json")
|
|
|
|
writeFile(t, cachePath, `{"id":"accessory_visualeffects","entries":[{"group":"head_accessories","model_stem":"hfx_bandana","source":"head_accessories/hfx_bandana.mdl"}]}`+"\n")
|
|
|
|
writeFile(t, cachePath, `{"id":"accessory_visualeffects","entries":[{"group":"head_accessories","model_stem":"hfx_bandana","source":"head_accessories/hfx_bandana.mdl"}]}`+"\n")
|
|
|
|
setFileTime(t, cachePath, time.Now().Add(-2*autogenManifestCacheMaxAge))
|
|
|
|
setFileTime(t, cachePath, time.Now().Add(-2*autogenManifestCacheMaxAge))
|
|
|
|
|
|
|
|
|
|
|
@@ -14361,8 +14361,8 @@ func testProject(root string) *project.Project {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Manifest: project.AutogenManifestConfig{
|
|
|
|
Manifest: project.AutogenManifestConfig{
|
|
|
|
ReleaseTag: "head-vfx-manifest-current",
|
|
|
|
ReleaseTag: "head-vfx-manifest-current",
|
|
|
|
AssetName: "sow-head-vfx-manifest.json",
|
|
|
|
AssetName: "sow-accessory-vfx-manifest.json",
|
|
|
|
CacheName: "sow-head-vfx-manifest.json",
|
|
|
|
CacheName: "sow-accessory-vfx-manifest.json",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|