Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
streamplace Makefile
38 kB · 1029 lines
Makefile
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030OUT_DIR?="bin"$(shell mkdir -p $(OUT_DIR))
.PHONY: defaultdefault: streamplace
VERSION?=$(shell go run ./pkg/config/git/git.go -v)VERSION_NO_V=$(subst v,,$(VERSION))VERSION_ELECTRON=$(subst -,-z,$(subst v,,$(VERSION)))UUID?=$(shell go run ./pkg/config/uuid/uuid.go)BRANCH?=$(shell go run ./pkg/config/git/git.go --branch)
BUILDOS ?= $(shell uname -s | tr '[:upper:]' '[:lower:]')BUILDARCH ?= $(shell uname -m | tr '[:upper:]' '[:lower:]')ifeq ($(BUILDARCH),aarch64) BUILDARCH=arm64endififeq ($(BUILDARCH),x86_64) BUILDARCH=amd64endifMACOS_VERSION_FLAG=ifeq ($(BUILDOS),darwin) MACOS_VERSION_FLAG=-mmacosx-version-min=$(shell sw_vers -productVersion)endifBUILDDIR?=build-$(BUILDOS)-$(BUILDARCH)PKG_CONFIG_PATH=$(shell pwd)/$(BUILDDIR)/lib/pkgconfig:$(shell pwd)/$(BUILDDIR)/lib/gstreamer-1.0/pkgconfig:$(shell pwd)/$(BUILDDIR)/meson-uninstalled
# Sentinel file that records when lexicons were last builtLEXICON_STAMP := .build/lexicon-stamp
# Find all files in the lexicons/ directoryLEXICON_SOURCES := $(shell find lexicons -type f)
# The stamp file depends on all lexicon sources.# It only rebuilds when any source is newer than the stamp.$(LEXICON_STAMP): $(LEXICON_SOURCES) $(MAKE) lexicons touch $(LEXICON_STAMP)
.PHONY: versionversion: @go run ./pkg/config/git/git.go -v \ && go run ./pkg/config/git/git.go --env -o .ci/build.env
# _____ _____# /\ | __ \| __ \# / \ | |__) | |__) |# / /\ \ | ___/| ___/# / ____ \| | | |# /_/ \_\_| |_|
# front-end stuff innit
.PHONY: installinstall: pnpm install
.PHONY: appapp: install pnpm run build
.PHONY: app-cachedapp-cached: if [ ! -f js/app/dist/index.html ] || [ ! -f js/web/dist/index.html ]; then $(MAKE) app; else echo "frontends already built, run make app to rebuild"; fi
.PHONY: ci-iosci-ios: version install app $(MAKE) ios $(MAKE) ci-upload-ios
.PHONY: ci-androidci-android: version install android ci-upload-android
.PHONY: ci-android-debugci-android-debug: version install pnpm run app prebuild $(MAKE) android-debug $(MAKE) ci-upload-android-debug
.PHONY: ci-android-releaseci-android-release: version install pnpm run app prebuild $(MAKE) android-release $(MAKE) ci-upload-android-release
ANDROID_KEYSTORE_PASSWORD?=streamplaceANDROID_KEYSTORE_ALIAS?=alias_nameANDROID_KEYSTORE_BASE64?=
.PHONY: android-keystoreandroid-keystore: if [ -n "$$ANDROID_KEYSTORE_BASE64" ]; then \ echo "$$ANDROID_KEYSTORE_BASE64" | base64 -d > my-release-key.keystore; \ fi; \ if [ ! -f my-release-key.keystore ]; then \ keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000 -storepass $(ANDROID_KEYSTORE_PASSWORD) -keypass $(ANDROID_KEYSTORE_PASSWORD) -dname "CN=Streamplace, OU=Streamplace, O=Streamplace, L=Streamplace, S=Streamplace, C=US"; \ fi
.PHONY: androidandroid: app .build/bundletool.jar $(MAKE) android-release $(MAKE) android-debug
.PHONY: android-releaseandroid-release: .build/bundletool.jar android-keystore @if grep -q e2e_network_security_config js/app/android/app/src/main/AndroidManifest.xml; then \ echo "js/app/android was prebuilt for e2e (make android-e2e); run 'cd js/app && pnpm run prebuild' before a release build"; \ exit 1; \ fi export NODE_ENV=production \ && cd ./js/app/android \ && ./gradlew :app:bundleRelease \ && cd - \ && mv ./js/app/android/app/build/outputs/bundle/release/app-release.aab ./bin/streamplace-$(VERSION)-android-release.aab \ && cd bin \ && java -jar ../.build/bundletool.jar build-apks --ks ../my-release-key.keystore --ks-key-alias alias_name --ks-pass pass:$(ANDROID_KEYSTORE_PASSWORD) --bundle=streamplace-$(VERSION)-android-release.aab --output=streamplace-$(VERSION)-android-release.apks --mode=universal \ && unzip streamplace-$(VERSION)-android-release.apks && mv universal.apk streamplace-$(VERSION)-android-release.apk && rm toc.pb
# The release build for the Maestro suite (hack/e2e-local.sh): it trusts# user-installed CAs and never takes OTA updates (SP_E2E_BUILD in# js/app/app.config.ts). For testing only; never ship it..PHONY: android-e2eandroid-e2e: .build/bundletool.jar android-keystore cd js/app && SP_E2E_BUILD=true pnpm run prebuild export NODE_ENV=production \ && cd ./js/app/android \ && ./gradlew :app:bundleRelease \ && cd - \ && mv ./js/app/android/app/build/outputs/bundle/release/app-release.aab ./bin/streamplace-$(VERSION)-android-e2e.aab \ && cd bin \ && java -jar ../.build/bundletool.jar build-apks --overwrite --ks ../my-release-key.keystore --ks-key-alias alias_name --ks-pass pass:$(ANDROID_KEYSTORE_PASSWORD) --bundle=streamplace-$(VERSION)-android-e2e.aab --output=streamplace-$(VERSION)-android-e2e.apks --mode=universal \ && unzip -o streamplace-$(VERSION)-android-e2e.apks && mv universal.apk streamplace-$(VERSION)-android-e2e.apk && rm toc.pb
.PHONY: android-debugandroid-debug: .build/bundletool.jar android-keystore export NODE_ENV=production \ && cd ./js/app/android \ && ./gradlew :app:bundleDebug \ && cd - \ && mv ./js/app/android/app/build/outputs/bundle/debug/app-debug.aab ./bin/streamplace-$(VERSION)-android-debug.aab \ && cd bin \ && java -jar ../.build/bundletool.jar build-apks --ks ../my-release-key.keystore --ks-key-alias alias_name --ks-pass pass:$(ANDROID_KEYSTORE_PASSWORD) --bundle=streamplace-$(VERSION)-android-debug.aab --output=streamplace-$(VERSION)-android-debug.apks --mode=universal \ && unzip streamplace-$(VERSION)-android-debug.apks && mv universal.apk streamplace-$(VERSION)-android-debug.apk && rm toc.pb
.PHONY: iosios: app xcodebuild \ -workspace ./js/app/ios/Streamplace.xcworkspace \ -sdk iphoneos \ -configuration Release \ -scheme Streamplace \ -archivePath ./bin/streamplace-$(VERSION)-ios-release.xcarchive \ CODE_SIGN_IDENTITY=- \ AD_HOC_CODE_SIGNING_ALLOWED=YES \ CODE_SIGN_STYLE=Automatic \ DEVELOPMENT_TEAM=ZZZZZZZZZZ \ clean archive | xcpretty \ && cd bin \ && tar -czvf streamplace-$(VERSION)-ios-release.xcarchive.tar.gz streamplace-$(VERSION)-ios-release.xcarchive
# _____ ____# / ____|/ __ \# | | __| | | |# | | |_ | | | |# | |__| | |__| |# \_____|\____/
.PHONY: rtcrecrtcrec: go build -o $(BUILDDIR)/rtcrec ./pkg/rtcrec/cmd/...
# Go takes care of this automatically but we can speed up the build by downloading go deps while the build is running.PHONY: godepsgodeps: go get ./pkg/...
# __ __ ______ _____ ____ _ _# | \/ | ____|/ ____|/ __ \| \ | |# | \ / | |__ | (___ | | | | \| |# | |\/| | __| \___ \| | | | . ` |# | | | | |____ ____) | |__| | |\ |# |_| |_|______|_____/ \____/|_| \_|
BASE_OPTS = \ --buildtype=debugoptimized \ -D "gst-plugins-base:audioresample=enabled" \ -D "gst-plugins-base:playback=enabled" \ -D "gst-plugins-base:opus=enabled" \ -D "gst-plugins-base:gio-typefinder=enabled" \ -D "gst-plugins-base:videotestsrc=enabled" \ -D "gst-plugins-base:videoconvertscale=enabled" \ -D "gst-plugins-base:typefind=enabled" \ -D "gst-plugins-base:compositor=enabled" \ -D "gst-plugins-base:videorate=enabled" \ -D "gst-plugins-base:app=enabled" \ -D "gst-plugins-base:audiorate=enabled" \ -D "gst-plugins-base:audiotestsrc=enabled" \ -D "gst-plugins-base:audioconvert=enabled" \ -D "gst-plugins-good:matroska=enabled" \ -D "gst-plugins-good:multifile=enabled" \ -D "gst-plugins-good:rtp=enabled" \ -D "gst-plugins-bad:fdkaac=enabled" \ -D "gst-plugins-bad:rtmp2=enabled" \ -D "gst-plugins-good:audioparsers=enabled" \ -D "gst-plugins-good:isomp4=enabled" \ -D "gst-plugins-good:png=enabled" \ -D "gst-plugins-good:videobox=enabled" \ -D "gst-plugins-good:jpeg=enabled" \ -D "gst-plugins-good:audioparsers=enabled" \ -D "gst-plugins-bad:videoparsers=enabled" \ -D "gst-plugins-bad:mpegtsmux=enabled" \ -D "gst-plugins-bad:mpegtsdemux=enabled" \ -D "gst-plugins-bad:codectimestamper=enabled" \ -D "gst-plugins-bad:opus=enabled" \ -D "gst-plugins-bad:rtmp2=enabled" \ -D "gst-plugins-good:flv=enabled" \ -D "gst-plugins-ugly:x264=enabled" \ -D "gst-plugins-ugly:gpl=enabled" \ -D "x264:asm=enabled" \ -D "gstreamer-full:gst-full=enabled" \ -D "gstreamer-full:gst-full-plugins=libgstflv.a;libgstrtmp2.a;libgstopusparse.a;libgstcodectimestamper.a;libgstrtp.a;libgstaudioresample.a;libgstlibav.a;libgstmatroska.a;libgstmultifile.a;libgstjpeg.a;libgstaudiotestsrc.a;libgstaudioconvert.a;libgstaudioparsers.a;libgstfdkaac.a;libgstisomp4.a;libgstapp.a;libgstvideoconvertscale.a;libgstvideobox.a;libgstvideorate.a;libgstpng.a;libgstcompositor.a;libgstaudiorate.a;libgstx264.a;libgstopus.a;libgstvideotestsrc.a;libgstvideoparsersbad.a;libgstaudioparsers.a;libgstmpegtsmux.a;libgstmpegtsdemux.a;libgstplayback.a;libgsttypefindfunctions.a;libgstcoretracers.a;libgstcodec2json.a" \ -D "gstreamer-full:gst-full-libraries=gstreamer-controller-1.0,gstreamer-plugins-base-1.0,gstreamer-pbutils-1.0" \ -D "gstreamer-full:gst-full-elements=coreelements:concat,filesrc,filesink,queue,queue2,multiqueue,typefind,tee,capsfilter,fakesink,identity" \ -D "gstreamer-full:bad=enabled" \ -D "gstreamer-full:tls=disabled" \ -D "gstreamer-full:libav=enabled" \ -D "gstreamer-full:ugly=enabled" \ -D "gstreamer-full:gpl=enabled" \ -D "gstreamer-full:gst-full-typefind-functions=" \ -D "gstreamer:coretracers=enabled" \ -D "gstreamer-full:glib_assert=false" \ -D "gstreamer:glib_assert=false" \ -D "gst-plugins-good:glib_assert=false" \ -D "gst-plugins-bad:glib_assert=false" \ -D "gst-plugins-base:glib_assert=false" \ -D "gst-plugins-ugly:glib_assert=false" \ -D "glib:glib_assert=false" \ -D "glib:glib_assert=false" \ -D "gst-libav:glib_assert=false" \ -D "gst-plugins-good:adaptivedemux2=disabled" \ -D "gst-plugins-bad:codec2json=enabled"
STATIC_OPTS = \ $(BASE_OPTS) \ -D "gstreamer-full:gst-full-target-type=static_library" \ -D "gstreamer:registry=false"
SHARED_OPTS = \ $(BASE_OPTS) \ -D "FFmpeg:default_library=shared" \ -D "gstreamer:registry=true"
.PHONY: mesonmeson: $(MAKE) meson-setup $(MAKE) meson-compile
MESON_SETUP_OPTS?=.PHONY: meson-setupmeson-setup: @meson setup $(BUILDDIR) $(MESON_SETUP_OPTS) @meson configure $(BUILDDIR) $(OPTS)
.PHONY: meson-setup-staticmeson-setup-static: @meson setup $(BUILDDIR) $(MESON_SETUP_OPTS) $(STATIC_OPTS) @meson configure $(BUILDDIR) $(STATIC_OPTS)
.PHONY: meson-compilemeson-compile: meson install -C $(BUILDDIR)
# _____ _______ _______ _____ _____# / ____|__ __|/\|__ __|_ _/ ____|# | (___ | | / \ | | | || |# \___ \ | | / /\ \ | | | || |# ____) | | |/ ____ \| | _| || |____# |_____/ |_/_/ \_\_| |_____\_____|
# Production distributions of Streamplace with bundled node and app.
static: $(MAKE) meson-setup meson-compile app OPTS=$(STATIC_OPTS) -j16 $(MAKE) streamplace
.PHONY: static-teststatic-test: go install github.com/jstemmer/go-junit-report/v2@latest \ && PKG_CONFIG_PATH=$(shell realpath $(BUILDDIR)/meson-uninstalled) \ bash -euo pipefail -c "go test -p 1 -timeout 300s ./pkg/... -v | tee /dev/stderr | go-junit-report -out test.xml"
# Run `streamplace vod-test` against a known set of fixture VODs using# the static binary at ./build-linux-amd64/streamplace. Skips cleanly# on cross-compiled targets where the amd64 binary can't run on the# build host. Driven by hack/test-vod.sh..PHONY: test-vodtest-vod: bash hack/test-vod.sh
# _____ ________ __# | __ \| ____\ \ / /# | | | | |__ \ \ / /# | | | | __| \ \/ /# | |__| | |____ \ /# |_____/|______| \/
# Local builds of Streamplace with node and app.
# The long-running build container for this checkout: named after the# checkout directory (streamplace-N), with the whole parent directory# bind-mounted at the same path so sibling checkouts are visible. Both# targets are idempotent and adopt a container that already exists (under# either name) or is stopped. See .claude/skills/streamplace-docker/SKILL.md..PHONY: containercontainer: bash hack/container.sh ensure
# The one command a fresh checkout needs: make sure the container is up, then# build the dev environment inside it. Run inside the container it degrades to# plain `make dev-setup`..PHONY: dev-containerdev-container: bash hack/container.sh dev-setup
# Cold checkout to a proven dev environment: container, dependencies, embedded# frontends, dev binaries, Playwright browser and a passing e2e run. Idempotent# — re-run it after a branch switch and it redoes only what went stale..PHONY: provisionprovision: bash hack/provision.sh
.PHONY: dev-setupdev-setup: $(MAKE) -j16 app-cached dev-setup-meson
.PHONY: devdev: app-cached $(LEXICON_STAMP) if [ ! -d $(BUILDDIR) ]; then $(MAKE) dev-setup; fi cp ./util/streamplace-dev.sh $(BUILDDIR)/streamplace $(MAKE) dev-rust PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \ CGO_LDFLAGS="$(MACOS_VERSION_FLAG)" \ LD_LIBRARY_PATH=$(BUILDDIR)/lib go build -tags mainnet -o $(BUILDDIR)/libstreamplace ./cmd/libstreamplace/...
.PHONY: dev-webdev-web: app-cached $(LEXICON_STAMP) if [ ! -d $(BUILDDIR) ]; then $(MAKE) dev-setup; fi cp ./util/streamplace-dev-web.sh $(BUILDDIR)/streamplace $(MAKE) dev-rust PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \ CGO_LDFLAGS="$(MACOS_VERSION_FLAG)" \ LD_LIBRARY_PATH=$(BUILDDIR)/lib go build -tags mainnet -o $(BUILDDIR)/libstreamplace ./cmd/libstreamplace/...
.PHONY: dev-setup-mesondev-setup-meson: $(MAKE) dev-setup-meson-configure $(MAKE) meson-compile
.PHONY: dev-setup-meson-configuredev-setup-meson-configure: meson setup --default-library=shared $(BUILDDIR) $(SHARED_OPTS) meson configure --default-library=shared $(BUILDDIR) $(SHARED_OPTS)
.PHONY: dev-rustdev-rust: .build/bin/uniffi-bindgen-go-forked cargo build EXT=so; \ if [ "$(BUILDOS)" = "darwin" ]; then EXT=dylib; fi; \ .build/bin/uniffi-bindgen-go-forked --out-dir pkg/iroh/generated --library ./target/debug/libiroh_streamplace.$$EXT \ && mkdir -p $(BUILDDIR)/rust/iroh-streamplace/ \ && mkdir -p $(BUILDDIR)/lib/ \ && cp ./target/debug/libiroh_streamplace.$$EXT $(BUILDDIR)/rust/iroh-streamplace/libiroh_streamplace.$$EXT.tmp \ && mv $(BUILDDIR)/rust/iroh-streamplace/libiroh_streamplace.$$EXT.tmp $(BUILDDIR)/rust/iroh-streamplace/libiroh_streamplace.$$EXT \ && cp ./target/debug/libiroh_streamplace.$$EXT $(BUILDDIR)/lib/libiroh_streamplace.$$EXT.tmp \ && mv $(BUILDDIR)/lib/libiroh_streamplace.$$EXT.tmp $(BUILDDIR)/lib/libiroh_streamplace.$$EXT
.PHONY: dev-testdev-test: go install github.com/jstemmer/go-junit-report/v2@latest \ && PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \ LD_LIBRARY_PATH=$(shell realpath $(BUILDDIR))/lib \ CGO_LDFLAGS="-lm" \ bash -euo pipefail -c "go test -p 1 -timeout 30m ./pkg/... -v | tee /dev/stderr | go-junit-report -out test.xml"
.PHONY: iroh-testiroh-test: $(MAKE) dev-rust PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \ LD_LIBRARY_PATH=$(shell realpath $(BUILDDIR))/lib \ go build -o $(BUILDDIR)/iroh-test ./pkg/iroh/iroh_test/...
# _ _____ _ _ _______ _____ _ _ _____# | | |_ _| \ | |__ __|_ _| \ | |/ ____|# | | | | | \| | | | | | | \| | | __# | | | | | . ` | | | | | | . ` | | |_ |# | |____ _| |_| |\ | | | _| |_| |\ | |__| |# |______|_____|_| \_| |_| |_____|_| \_|\_____|
.PHONY: checkcheck: install $(MAKE) golangci-lint pnpm run check if [ "`gofmt -l . | wc -l`" -gt 0 ]; then echo 'gofmt failed, run make fix'; exit 1; fi RUSTFLAGS="-D warnings" cargo check
.PHONY: fixfix: pnpm run fix gofmt -w . cargo fix --allow-dirty go mod tidy
.PHONY: golangci-lintgolangci-lint: @PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \ go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint run -c ./.golangci.yaml
# _ ________ _______ _____ ____ _ _ _____# | | | ____\ \ / /_ _/ ____/ __ \| \ | |/ ____|# | | | |__ \ V / | || | | | | | \| | (___# | | | __| > < | || | | | | | . ` |\___ \# | |____| |____ / . \ _| || |___| |__| | |\ |____) |# |______|______/_/ \_\_____\_____\____/|_| \_|_____/
# Mostly codegen for lexicons.
.PHONY: lexiconslexicons: $(MAKE) go-lexicons \ && $(MAKE) js-lexicons \ && $(MAKE) md-lexicons
# glex is the standalone Go lexicon codegen tool (github.com/streamplace/glex).# It generates Go types that serialize as canonical DAG-CBOR via go-dasl,# using the glex runtime (github.com/streamplace/glex/runtime) for the data model.GO_LEXICON_GEN := github.com/streamplace/glex/cmd/glex
.PHONY: go-lexiconsgo-lexicons: go tool github.com/streamplace/glex/cmd/glex install \ && go tool github.com/streamplace/glex/cmd/glex build \ --lexicons-dir lexicons \ --output-dir pkg \ --module-path stream.place/streamplace/pkg \ --gen-server spxrpc \ lexicons
.PHONY: js-lexiconsjs-lexicons: pnpm exec lex install \ && node js/streamplace/scripts/gen-raw-lexicons.mjs \ && pnpm exec lex build \ --lexicons lexicons \ --out js/streamplace/src/lexicons \ --clear --index-file --no-pretty \ --exclude place.stream.live.subscribeSegments
.PHONY: md-lexiconsmd-lexicons: find "js/docs/src/content/docs/lex-reference" -type f -name '*.md' -delete \ && pnpm exec lexmd \ ./lexicons \ .build/temp \ ./lexicons \ js/docs/src/content/docs/lex-reference/openapi.json \ && ls -R .build/temp \ && cp -rf .build/temp/place/stream/* js/docs/src/content/docs/lex-reference/ \ && rm -rf .build/temp \ && find js/docs/src/content/docs/lex-reference -type f | xargs pnpm exec prettier --write --ignore-unknown
.PHONY: ci-lexiconsci-lexicons: $(MAKE) lexicons \ && if ! git diff --exit-code >/dev/null; then echo "lexicons are out of date, run 'make lexicons' to fix"; git diff; exit 1; fi
# _______ ______ _____ _______ _____ _ _ _____# |__ __| ____|/ ____|__ __|_ _| \ | |/ ____|# | | | |__ | (___ | | | | | \| | | __# | | | __| \___ \ | | | | | . ` | | |_ |# | | | |____ ____) | | | _| |_| |\ | |__| |# |_| |______|_____/ |_| |_____|_| \_|\_____|
# test to make sure we haven't added any more dynamic dependenciesLINUX_LINK_COUNT=5.PHONY: link-test-linuxlink-test-linux: count=$(shell ldd ./build-linux-amd64/streamplace | wc -l) \ && echo $$count \ && if [ "$$count" != "$(LINUX_LINK_COUNT)" ]; then echo "ldd reports new libaries linked! want $(LINUX_LINK_COUNT) got $$count" \ && ldd ./build-linux-amd64/streamplace \ && exit 1; \ fi
MACOS_LINK_COUNT=10.PHONY: link-test-macoslink-test-macos: count=$(shell otool -L ./build-darwin-arm64/streamplace | wc -l | xargs) \ && echo $$count \ && if [ "$$count" != "$(MACOS_LINK_COUNT)" ]; then echo "otool -L reports new libaries linked! want $(MACOS_LINK_COUNT) got $$count" \ && otool -L ./build-darwin-arm64/streamplace \ && exit 1; \ fi
WINDOWS_LINK_COUNT=19.PHONY: link-test-windowslink-test-windows: count=$(shell x86_64-w64-mingw32-objdump -p ./build-windows-amd64/streamplace.exe | grep "DLL Name" | tr '[:upper:]' '[:lower:]' | sort | uniq | wc -l | xargs) \ && echo $$count \ && if [ "$$count" != "$(WINDOWS_LINK_COUNT)" ]; then echo "x86_64-w64-mingw32-objdump -p reports new libaries linked! want $(WINDOWS_LINK_COUNT) got $$count" \ && x86_64-w64-mingw32-objdump -p ./build-windows-amd64/streamplace.exe | grep "DLL Name" \ && exit 1; \ fi
.PHONY: cici: version install app node-all-platforms ci-upload-node
.PHONY: ci-desktop-darwinci-desktop-darwin: version install ./util/mac-codesign.sh \ && for arch in amd64 arm64; do \ curl -v --fail-with-body -O "$$CI_API_V4_URL/projects/$$CI_PROJECT_ID/packages/generic/$(BRANCH)/$(VERSION)/streamplace-$(VERSION)-darwin-$$arch.tar.gz" || exit 1 \ && tar -xzvf streamplace-$(VERSION)-darwin-$$arch.tar.gz \ && ./streamplace --version \ && ./streamplace self-test \ && mkdir -p build-darwin-$$arch \ && mv ./streamplace ./build-darwin-$$arch/streamplace; \ done \ && $(MAKE) desktop-darwin \ && for arch in amd64 arm64; do \ export file=streamplace-desktop-$(VERSION)-darwin-$$arch.zip \ && $(MAKE) ci-upload-file upload_file=$$file \ && export file=streamplace-desktop-$(VERSION)-darwin-$$arch.dmg \ && $(MAKE) ci-upload-file upload_file=$$file; \ done
.PHONY: ci-testci-test: app meson setup $(BUILDDIR) $(OPTS) meson test -C $(BUILDDIR) go-tests
.PHONY: ci-npm-releaseci-npm-release: install echo //registry.npmjs.org/:_authToken=$$NPM_TOKEN > ~/.npmrc \ && npx lerna publish from-package --yes
.build/bin/uniffi-bindgen-go-forked: mkdir -p .build \ && cargo install uniffi-bindgen-go --git https://github.com/kegsay/uniffi-bindgen-go --rev f1f1064871faf05377c75e098d525d530d402d38 --root .build \ && mv .build/bin/uniffi-bindgen-go .build/bin/uniffi-bindgen-go-forked
.build/bundletool.jar: mkdir -p .build \ && curl -L -o ./.build/bundletool.jar https://github.com/google/bundletool/releases/download/1.17.0/bundletool-all-1.17.0.jar
.PHONY: selftest-macosselftest-macos: js/desktop/out/Streamplace-darwin-arm64/Streamplace.app/Contents/MacOS/Streamplace -- --self-test
# _____ _____ ____ _____ _____# / ____| __ \ / __ \ / ____/ ____|# | | | |__) | | | | (___| (___# | | | _ /| | | |\___ \\___ \# | |____| | \ \| |__| |____) |___) |# \_____|_| \_\\____/|_____/_____/# _____ ____ __ __ _____ _____ _ _____ _ _ _____# / ____/ __ \| \/ | __ \_ _| | |_ _| \ | |/ ____|# | | | | | | \ / | |__) || | | | | | | \| | | __# | | | | | | |\/| | ___/ | | | | | | | . ` | | |_ |# | |___| |__| | | | | | _| |_| |____ _| |_| |\ | |__| |# \_____\____/|_| |_|_| |_____|______|_____|_| \_|\_____|
# Cross-compiling is exclusively right now from linux-amd64 to:
# linux-amd64 (native)# linux-arm64# windows-amd64# darwin-amd64# darwin-arm64
.PHONY: node-all-platformsnode-all-platforms: app meson setup build-linux-amd64 $(OPTS) --buildtype debugoptimized meson compile -C build-linux-amd64 archive $(MAKE) link-test-linux $(MAKE) linux-arm64 $(MAKE) windows-amd64 $(MAKE) windows-amd64-startup-test $(MAKE) desktop-linux $(MAKE) desktop-windows-amd64
.PHONY: desktop-linuxdesktop-linux: $(MAKE) desktop-linux-amd64 $(MAKE) desktop-linux-arm64
.PHONY: desktop-linux-amd64desktop-linux-amd64: cd js/desktop \ && pnpm run make --platform linux --arch x64 \ && cd - \ && mv "js/desktop/out/make/AppImage/x64/Streamplace-$(VERSION_ELECTRON)-x64.AppImage" ./bin/streamplace-desktop-$(VERSION)-linux-amd64.AppImage
.PHONY: desktop-linux-arm64desktop-linux-arm64: cd js/desktop \ && pnpm run make --platform linux --arch arm64 \ && cd - \ && mv "js/desktop/out/make/AppImage/arm64/Streamplace-$(VERSION_ELECTRON)-arm64.AppImage" ./bin/streamplace-desktop-$(VERSION)-linux-arm64.AppImage
.PHONY: desktop-windows-amd64desktop-windows-amd64: cd js/desktop \ && pnpm run make --platform win32 --arch x64 \ && cd - \ && export SUM=$$(cat ./js/desktop/out/make/squirrel.windows/x64/streamplace_desktop-$(VERSION_ELECTRON)-full.nupkg | openssl sha1 | awk '{ print $$2 }') \ && echo $$SUM > ./bin/streamplace-desktop-$(VERSION)-windows-amd64.nupkg.sha1 \ && mv "js/desktop/out/make/squirrel.windows/x64/streamplace_desktop-$(VERSION_ELECTRON)-full.nupkg" ./bin/streamplace-desktop-$(VERSION)-windows-amd64.$$SUM.nupkg \ && mv "js/desktop/out/make/squirrel.windows/x64/Streamplace-$(VERSION_ELECTRON) Setup.exe" ./bin/streamplace-desktop-$(VERSION)-windows-amd64.exe
.PHONY: streamplacestreamplace: app-cached meson-setup-static meson compile -C $(BUILDDIR) streamplace | grep -v drectve
.PHONY: archivearchive: app-cached meson-setup-static godeps meson compile -C $(BUILDDIR) archive | grep -v drectve
.PHONY: linux-amd64linux-amd64: $(MAKE) -j $(shell nproc) archive $(MAKE) link-test-linux
.PHONY: linux-arm64linux-arm64: rustup target add aarch64-unknown-linux-gnu \ && CC=aarch64-linux-gnu-gcc \ LD=aarch64-linux-gnu-ld \ CROSS_COMPILE=1 \ MESON_SETUP_OPTS="--cross-file util/linux-arm64-gnu.ini" \ BUILDDIR=build-linux-arm64 \ CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \ $(MAKE) -j $(shell nproc) archive
.PHONY: windows-amd64windows-amd64: rustup target add x86_64-pc-windows-gnu \ && CC=x86_64-w64-mingw32-gcc \ LD=x86_64-w64-mingw32-ld \ CROSS_COMPILE=1 \ MESON_SETUP_OPTS="--cross-file util/windows-amd64-gnu.ini" \ BUILDDIR=build-windows-amd64 \ $(MAKE) -j $(shell nproc) archive
.PHONY: darwin-amd64darwin-amd64: export CC=x86_64-apple-darwin24.4-clang \ && export CC_X86_64_APPLE_DARWIN=x86_64-apple-darwin24.4-clang \ && export CXX_X86_64_APPLE_DARWIN=x86_64-apple-darwin24.4-clang++ \ && export AR_X86_64_APPLE_DARWIN=x86_64-apple-darwin24.4-ar \ && export CARGO_TARGET_X86_64_APPLE_DARWIN_LINKER=x86_64-apple-darwin24.4-clang \ && export LD=x86_64-apple-darwin24.4-ld \ && export CROSS_COMPILE=1 \ && export MESON_SETUP_OPTS="--cross-file util/osxcross-darwin-amd64.ini" \ && export BUILDDIR=build-darwin-amd64 \ && $(MAKE) -j $(shell nproc) streamplace \ && ./util/osxcross-codesign.sh ./build-darwin-amd64/streamplace \ && mkdir -p bin \ && cd build-darwin-amd64 \ && tar -czvf ../bin/streamplace-$(VERSION)-darwin-amd64.tar.gz ./streamplace \ && cd -
.PHONY: darwin-arm64darwin-arm64: export CC=aarch64-apple-darwin24.4-clang \ && export CC_AARCH64_APPLE_DARWIN=aarch64-apple-darwin24.4-clang \ && export CXX_AARCH64_APPLE_DARWIN=aarch64-apple-darwin24.4-clang++ \ && export AR_AARCH64_APPLE_DARWIN=aarch64-apple-darwin24.4-ar \ && export CARGO_TARGET_AARCH64_APPLE_DARWIN_LINKER=aarch64-apple-darwin24.4-clang \ && export LD=aarch64-apple-darwin24.4-ld \ && export CROSS_COMPILE=1 \ && export MESON_SETUP_OPTS="--cross-file util/osxcross-darwin-arm64.ini" \ && export BUILDDIR=build-darwin-arm64 \ && $(MAKE) -j $(shell nproc) streamplace \ && ./util/osxcross-codesign.sh ./build-darwin-arm64/streamplace \ && mkdir -p bin \ && cd build-darwin-arm64 \ && tar -czvf ../bin/streamplace-$(VERSION)-darwin-arm64.tar.gz ./streamplace \ && cd -
# unbuffer here is a workaround for wine trying to pop up a terminal window and failing.PHONY: windows-amd64-startup-testwindows-amd64-startup-test: bash -c 'set -euo pipefail && unbuffer wine64 ./build-windows-amd64/streamplace.exe self-test | cat'
.PHONY: desktop-darwin-amd64desktop-darwin-amd64: echo "TODO"
.PHONY: desktop-darwin-arm64desktop-darwin-arm64: echo "TODO"
.PHONY: desktop-darwindesktop-darwin: export DEBUG="electron-osx-sign*" \ && cd js/desktop \ && pnpm run make --platform darwin --arch arm64 \ && pnpm run make --platform darwin --arch x64 \ && cd - \ && mv js/desktop/out/make/Streamplace-$(VERSION_ELECTRON)-x64.dmg ./bin/streamplace-desktop-$(VERSION)-darwin-amd64.dmg \ && mv js/desktop/out/make/Streamplace-$(VERSION_ELECTRON)-arm64.dmg ./bin/streamplace-desktop-$(VERSION)-darwin-arm64.dmg \ && mv js/desktop/out/make/zip/darwin/x64/Streamplace-darwin-x64-$(VERSION_ELECTRON).zip ./bin/streamplace-desktop-$(VERSION)-darwin-amd64.zip \ && mv js/desktop/out/make/zip/darwin/arm64/Streamplace-darwin-arm64-$(VERSION_ELECTRON).zip ./bin/streamplace-desktop-$(VERSION)-darwin-arm64.zip
# link your local version of mist for dev.PHONY: link-mistlink-mist: rm -rf subprojects/mistserver ln -s $$(realpath ../mistserver) ./subprojects/mistserver
# link your local version of gstreamer.PHONY: link-gstreamerlink-gstreamer: rm -rf subprojects/gstreamer-full ln -s $$(realpath ../gstreamer) ./subprojects/gstreamer-full
# link your local version of ffmpeg for dev.PHONY: link-ffmpeglink-ffmpeg: rm -rf subprojects/FFmpeg ln -s $$(realpath ../ffmpeg) ./subprojects/FFmpeg
# _____ ____ _____ _ ________ _____# | __ \ / __ \ / ____| |/ / ____| __ \# | | | | | | | | | ' /| |__ | |__) |# | | | | | | | | | < | __| | _ /# | |__| | |__| | |____| . \| |____| | \ \# |_____/ \____/ \_____|_|\_\______|_| \_\
# Actually, Podman. I'm not sure if these commands will actually run on Docker, untested.
.PHONY: dockerdocker: docker build -f docker/local.Dockerfile -t dist.stream.place/streamplace/streamplace:local .
.PHONY: docker-builddocker-build: docker-build-builder docker-build-in-container
.PHONY: docker-testdocker-test: docker-build-builder docker-test-in-container
DOCKER_BUILD_OPTS?=BUILDER_TARGET?=builder.PHONY: docker-build-builderdocker-build-builder: podman build --target=$(BUILDER_TARGET) --os=linux --arch=amd64 -f docker/build.Dockerfile -t dist.stream.place/streamplace/streamplace:$(BUILDER_TARGET) $(DOCKER_BUILD_OPTS) .
.PHONY: precommitprecommit: dockerfile-hash-precommit
.PHONY: dockefile-hash-precommitdockerfile-hash-precommit: @bash -c 'printf "variables:\n DOCKERFILE_HASH: `git hash-object docker/build.Dockerfile`" > .ci/dockerfile-hash.yaml' \ && git add .ci/dockerfile-hash.yaml
# tricks the github action for golangci-lint to run inside a container.PHONY: golangci-lint-containergolangci-lint-container: docker-build-builder podman run \ -v $$(pwd):$$(pwd) \ -w $$(pwd) \ -e PKG_CONFIG_PATH=$$(pwd)/build-linux-amd64/lib/pkgconfig \ -d \ --name golangci-lint \ dist.stream.place/streamplace/streamplace:$(BUILDER_TARGET) \ tail -f /dev/null podman exec golangci-lint mkdir -p js/app/dist podman exec golangci-lint touch js/app/dist/index.html podman exec golangci-lint mkdir -p js/web/dist podman exec golangci-lint touch js/web/dist/index.html podman exec golangci-lint mkdir -p .build podman exec golangci-lint touch .build/lexicon-stamp podman exec golangci-lint make dev
# runs a command in the build container, building if necessaryIN_CONTAINER_CMD?=echo 'usage: make in-container IN_CONTAINER_CMD=\"<command>\"'DOCKER_BIN?=podmanDOCKER_REF?=dist.stream.place/streamplace/streamplace:$(BUILDER_TARGET)DOCKER_OPTS?=DOCKER_PWD_MOUNT_PATH?=$$(pwd).PHONY: in-containerin-container: docker-build-builder $(DOCKER_BIN) run $(DOCKER_OPTS) -v $$(pwd):$(DOCKER_PWD_MOUNT_PATH) -w $(DOCKER_PWD_MOUNT_PATH) --rm $(DOCKER_REF) bash -c "$(IN_CONTAINER_CMD)"
.PHONY: docker-shelldocker-shell: $(MAKE) in-container IN_CONTAINER_CMD="bash" DOCKER_OPTS="-it -v $$(pwd):$$(pwd) -w $$(pwd)"
STREAMPLACE_URL?=https://git.stream.place/streamplace/streamplace/-/package_files/10122/download.PHONY: docker-releasedocker-release: cd docker \ && docker build -f release.Dockerfile \ --build-arg TARGETARCH=$(BUILDARCH) \ --build-arg STREAMPLACE_URL=$(STREAMPLACE_URL) \ -t dist.stream.place/streamplace/streamplace \ .
.PHONY: docker-mistserverdocker-mistserver: cd docker \ && docker build -f mistserver.Dockerfile \ --build-arg TARGETARCH=$(BUILDARCH) \ --build-arg STREAMPLACE_URL=$(STREAMPLACE_URL) \ -t dist.stream.place/streamplace/streamplace:mistserver \
# _____ _____ _____ _______ _____ ____# | __ \_ _|/ ____|__ __| __ \ / __ \# | | | || | | (___ | | | |__) | | | |# | | | || | \___ \ | | | _ /| | | |# | |__| || |_ ____) | | | | | \ \| |__| |# |_____/_____|_____/ |_| |_| \_\\____/
# distro: cut new versions, build apt and brew packages, upload to S3/gitlab
.PHONY: releaserelease: install $(MAKE) lexicons pnpm run release
.PHONY: ci-releaseci-release: go install gitlab.com/gitlab-org/release-cli/cmd/release-cli go run ./pkg/config/git/git.go -release -o release.yml release-cli create-from-file --file release.yml
.PHONY: homebrewhomebrew: $(MAKE) ci-download-file download_file=streamplace-$(VERSION)-linux-amd64.tar.gz $(MAKE) ci-download-file download_file=streamplace-$(VERSION)-linux-arm64.tar.gz $(MAKE) ci-download-file download_file=streamplace-$(VERSION)-darwin-amd64.tar.gz $(MAKE) ci-download-file download_file=streamplace-$(VERSION)-darwin-arm64.tar.gz git clone git@github.com:streamplace/homebrew-streamplace.git /tmp/homebrew-streamplace go run ./pkg/config/git/git.go -homebrew -o /tmp/homebrew-streamplace/Formula/streamplace.rb
.PHONY: ci-homebrewci-homebrew: git config --global user.name "Streamplace Homebrew Robot" git config --global user.email support@stream.place mkdir -p ~/.ssh echo "Host * \n\ StrictHostKeyChecking no \n\ UserKnownHostsFile=/dev/null" > ~/.ssh/config echo "$$CI_HOMEBREW_KEY_BASE64" | base64 -d > ~/.ssh/id_ed25519 chmod 600 ~/.ssh/id_ed25519
chmod 600 ~/.ssh/config $(MAKE) homebrew cd /tmp/homebrew-streamplace \ && git add . \ && git commit -m "Update streamplace $(VERSION)" \ && git push
FPM_BASE_OPTS= \ -s dir \ -t deb \ -v $(VERSION_NO_V) \ --force \ --license=GPL-3.0-or-later \ --maintainer="Streamplace <support@stream.place>" \ --vendor="Streamplace" \ --url="https://stream.place"SP_ARCH_NAME?=amd64.PHONY: deb-pkgdeb-pkg: fpm $(FPM_BASE_OPTS) \ -n streamplace \ -a $(SP_ARCH_NAME) \ -p bin/streamplace-$(VERSION)-linux-$(SP_ARCH_NAME).deb \ --deb-systemd=util/systemd/streamplace.service \ --deb-systemd-restart-after-upgrade \ --after-install=util/systemd/after-install.sh \ --description="Live video for the AT Protocol. Solving video for everybody forever." \ build-linux-$(SP_ARCH_NAME)/streamplace=/usr/bin/streamplace
.PHONY: pkg-linux-amd64pkg-linux-amd64: $(MAKE) deb-pkg SP_ARCH_NAME=amd64
.PHONY: pkg-linux-arm64pkg-linux-arm64: $(MAKE) deb-pkg SP_ARCH_NAME=arm64
.PHONY: pkg-darwin-amd64pkg-darwin-amd64: echo todo
.PHONY: pkg-darwin-arm64pkg-darwin-arm64: echo todo
.PHONY: pkg-windows-amd64pkg-windows-amd64: echo todo
.PHONY: deb-releasedeb-release: aptly repo create -distribution=all -component=main streamplace-releases aptly mirror create old-version $$S3_PUBLIC_URL/debian all aptly mirror update old-version aptly repo import old-version streamplace-releases streamplace aptly repo add streamplace-releases \ bin/streamplace-$(VERSION)-linux-arm64.deb \ bin/streamplace-$(VERSION)-linux-amd64.deb aptly snapshot create streamplace-$(VERSION) from repo streamplace-releases aptly publish snapshot -distribution=all streamplace-$(VERSION) s3:streamplace-releases:
.PHONY: ci-deb-releaseci-deb-release: $(MAKE) ci-download-file download_file=streamplace-$(VERSION)-linux-amd64.deb $(MAKE) ci-download-file download_file=streamplace-$(VERSION)-linux-arm64.deb echo $$CI_SIGNING_KEY_BASE64 | base64 -d | gpg --import gpg --armor --export | gpg --no-default-keyring --keyring trustedkeys.gpg --import echo '{"S3PublishEndpoints":{"streamplace-releases":{"region":"'$$S3_REGION'","bucket":"'$$S3_BUCKET_NAME'","endpoint":"'$$S3_ENDPOINT'","acl":"public-read","prefix":"debian"}}}' > ~/.aptly.conf $(MAKE) deb-release
# _____ _____# / ____|_ _|# | | | |# | | | |# | |____ _| |_# \_____|_____|
# mostly "do a thing and then gitlab upload the artifact"
.PHONY: ci-uploadci-upload: ci-upload-node ci-upload-android
.PHONY: ci-upload-node-linux-amd64ci-upload-node-linux-amd64: $(MAKE) ci-upload-file upload_file=streamplace-$(VERSION)-linux-amd64.tar.gz \ && $(MAKE) ci-upload-file upload_file=streamplace-desktop-$(VERSION)-linux-amd64.AppImage \ && $(MAKE) ci-upload-file upload_file=streamplace-$(VERSION)-linux-amd64.deb
.PHONY: ci-upload-node-linux-arm64ci-upload-node-linux-arm64: $(MAKE) ci-upload-file upload_file=streamplace-$(VERSION)-linux-arm64.tar.gz \ && $(MAKE) ci-upload-file upload_file=streamplace-desktop-$(VERSION)-linux-arm64.AppImage \ && $(MAKE) ci-upload-file upload_file=streamplace-$(VERSION)-linux-arm64.deb
.PHONY: ci-upload-node-darwin-arm64ci-upload-node-darwin-arm64: export file=streamplace-$(VERSION)-darwin-arm64.tar.gz \ && $(MAKE) ci-upload-file upload_file=$$file;
.PHONY: ci-upload-node-darwin-amd64ci-upload-node-darwin-amd64: export file=streamplace-$(VERSION)-darwin-amd64.tar.gz \ && $(MAKE) ci-upload-file upload_file=$$file;
.PHONY: ci-upload-node-windows-amd64ci-upload-node-windows-amd64: export file=streamplace-$(VERSION)-windows-amd64.zip \ && $(MAKE) ci-upload-file upload_file=$$file; \ export file=streamplace-desktop-$(VERSION)-windows-amd64.exe \ && $(MAKE) ci-upload-file upload_file=$$file; \ export SUM=$$(cat bin/streamplace-desktop-$(VERSION)-windows-amd64.nupkg.sha1) \ && export file=streamplace-desktop-$(VERSION)-windows-amd64.$$SUM.nupkg \ && $(MAKE) ci-upload-file upload_file=$$file;
.PHONY: ci-upload-node-macosci-upload-node-macos: node-all-platforms-macos for GOOS in darwin; do \ for GOARCH in amd64 arm64; do \ export file=streamplace-$(VERSION)-$$GOOS-$$GOARCH.tar.gz \ && $(MAKE) ci-upload-file upload_file=$$file; \ export file=streamplace-desktop-$(VERSION)-$$GOOS-$$GOARCH.dmg \ && $(MAKE) ci-upload-file upload_file=$$file; \ export file=streamplace-desktop-$(VERSION)-$$GOOS-$$GOARCH.zip \ && $(MAKE) ci-upload-file upload_file=$$file; \ done \ done;
.PHONY: ci-upload-androidci-upload-android: android $(MAKE) ci-upload-android-debug \ && $(MAKE) ci-upload-android-release
.PHONY: ci-upload-android-debugci-upload-android-debug: $(MAKE) ci-upload-file upload_file=streamplace-$(VERSION)-android-debug.apk \ && $(MAKE) ci-upload-file upload_file=streamplace-$(VERSION)-android-debug.aab
.PHONY: ci-upload-android-releaseci-upload-android-release: $(MAKE) ci-upload-file upload_file=streamplace-$(VERSION)-android-release.apk \ && $(MAKE) ci-upload-file upload_file=streamplace-$(VERSION)-android-release.aab
.PHONY: ci-upload-iosci-upload-ios: ios $(MAKE) ci-upload-file upload_file=streamplace-$(VERSION)-ios-release.xcarchive.tar.gz
upload_file?="".PHONY: ci-upload-fileci-upload-file: curl \ --fail-with-body \ --header "JOB-TOKEN: $$CI_JOB_TOKEN" \ --upload-file bin/$(upload_file) \ "$$CI_API_V4_URL/projects/$$CI_PROJECT_ID/packages/generic/$(BRANCH)/$(VERSION)/$(upload_file)";
download_file?="".PHONY: ci-download-fileci-download-file: curl \ --fail-with-body \ --header "JOB-TOKEN: $$CI_JOB_TOKEN" \ -o bin/$(download_file) \ "$$CI_API_V4_URL/projects/$$CI_PROJECT_ID/packages/generic/$(BRANCH)/$(VERSION)/$(download_file)";
.PHONY: c2pa-typesc2pa-types: $(MAKE) dev-rust ./target/debug/export_c2pa_schema npx quicktype --lang go --src-lang schema --package c2patypes --out pkg/c2patypes/c2patypes.go ./target/schema/C2PA.schema.json gofmt -w pkg/c2patypes/c2patypes.go