mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-31 15:37:51 +01:00
Merge branch 'master' into lyrics-source-provenance
This commit is contained in:
commit
1bb4cac843
276 changed files with 6978 additions and 2329 deletions
14
plugins/testdata/Makefile
vendored
14
plugins/testdata/Makefile
vendored
|
|
@ -10,22 +10,26 @@ all: $(PLUGINS:%=%.ndp)
|
|||
|
||||
clean:
|
||||
rm -f $(PLUGINS:%=%.ndp) $(PLUGINS:%=%.wasm)
|
||||
rm -rf .wazero-cache $(PLUGINS:%=%.stage)
|
||||
|
||||
# PDK source files that trigger rebuild when changed (recursive)
|
||||
PDK_SOURCES := $(shell find ../pdk/go -name '*.go' 2>/dev/null)
|
||||
|
||||
# Build the .ndp package (zip containing manifest.json + plugin.wasm)
|
||||
# Stage under a per-target name: a shared plugin.wasm breaks concurrent builds.
|
||||
%.ndp: %.wasm %/manifest.json
|
||||
@rm -f $@
|
||||
@cp $< plugin.wasm
|
||||
zip -j $@ $*/manifest.json plugin.wasm
|
||||
@rm -f plugin.wasm
|
||||
@rm -rf $*.stage && mkdir -p $*.stage
|
||||
@cp $< $*.stage/plugin.wasm
|
||||
zip -j $@ $*/manifest.json $*.stage/plugin.wasm
|
||||
@rm -rf $*.stage
|
||||
@mv $< $<.tmp && mv $<.tmp $< # Touch wasm to ensure it's older than ndp
|
||||
|
||||
# Build the wasm binary
|
||||
# Build the wasm binary. -buildvcs=false keeps the bytes stable across commits, so
|
||||
# the test suite's wazero compilation cache still hits after a rebuild.
|
||||
%.wasm: %/*.go %/go.mod $(PDK_SOURCES)
|
||||
ifdef TINYGO
|
||||
cd $* && tinygo build -target wasip1 -buildmode=c-shared -o ../$@ .
|
||||
else
|
||||
cd $* && GOOS=wasip1 GOARCH=wasm go build -buildmode=c-shared -o ../$@ .
|
||||
cd $* && GOOS=wasip1 GOARCH=wasm go build -buildvcs=false -buildmode=c-shared -o ../$@ .
|
||||
endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue