Live video on the AT Protocol
at next 1004 lines 38 kB view raw
1OUT_DIR?="bin" 2$(shell mkdir -p $(OUT_DIR)) 3 4.PHONY: default 5default: streamplace 6 7VERSION?=$(shell go run ./pkg/config/git/git.go -v) 8VERSION_NO_V=$(subst v,,$(VERSION)) 9VERSION_ELECTRON=$(subst -,-z,$(subst v,,$(VERSION))) 10UUID?=$(shell go run ./pkg/config/uuid/uuid.go) 11BRANCH?=$(shell go run ./pkg/config/git/git.go --branch) 12 13BUILDOS ?= $(shell uname -s | tr '[:upper:]' '[:lower:]') 14BUILDARCH ?= $(shell uname -m | tr '[:upper:]' '[:lower:]') 15ifeq ($(BUILDARCH),aarch64) 16 BUILDARCH=arm64 17endif 18ifeq ($(BUILDARCH),x86_64) 19 BUILDARCH=amd64 20endif 21MACOS_VERSION_FLAG= 22ifeq ($(BUILDOS),darwin) 23 MACOS_VERSION_FLAG=-mmacosx-version-min=$(shell sw_vers -productVersion) 24endif 25BUILDDIR?=build-$(BUILDOS)-$(BUILDARCH) 26PKG_CONFIG_PATH=$(shell pwd)/$(BUILDDIR)/lib/pkgconfig:$(shell pwd)/$(BUILDDIR)/lib/gstreamer-1.0/pkgconfig:$(shell pwd)/$(BUILDDIR)/meson-uninstalled 27 28# Sentinel file that records when lexicons were last built 29LEXICON_STAMP := .build/lexicon-stamp 30 31# Find all files in the lexicons/ directory 32LEXICON_SOURCES := $(shell find lexicons -type f) 33 34# The stamp file depends on all lexicon sources. 35# It only rebuilds when any source is newer than the stamp. 36$(LEXICON_STAMP): $(LEXICON_SOURCES) 37 $(MAKE) lexicons 38 touch $(LEXICON_STAMP) 39 40.PHONY: version 41version: 42 @go run ./pkg/config/git/git.go -v \ 43 && go run ./pkg/config/git/git.go --env -o .ci/build.env 44 45# _____ _____ 46# /\ | __ \| __ \ 47# / \ | |__) | |__) | 48# / /\ \ | ___/| ___/ 49# / ____ \| | | | 50# /_/ \_\_| |_| 51 52# front-end stuff innit 53 54.PHONY: install 55install: 56 pnpm install 57 58.PHONY: app 59app: install 60 pnpm run build 61 62.PHONY: app-cached 63app-cached: 64 if [ ! -f js/app/dist/index.html ]; then $(MAKE) app; else echo "js/app/dist/index.html exists, not rebuilding, run make app to rebuild"; fi 65 66.PHONY: ci-ios 67ci-ios: version install app 68 $(MAKE) ios 69 $(MAKE) ci-upload-ios 70 71.PHONY: ci-android 72ci-android: version install android ci-upload-android 73 74.PHONY: ci-android-debug 75ci-android-debug: version install 76 pnpm run app prebuild 77 $(MAKE) android-debug 78 $(MAKE) ci-upload-android-debug 79 80.PHONY: ci-android-release 81ci-android-release: version install 82 pnpm run app prebuild 83 $(MAKE) android-release 84 $(MAKE) ci-upload-android-release 85 86 87ANDROID_KEYSTORE_PASSWORD?=streamplace 88ANDROID_KEYSTORE_ALIAS?=alias_name 89ANDROID_KEYSTORE_BASE64?= 90 91.PHONY: android-keystore 92android-keystore: 93 if [ -n "$$ANDROID_KEYSTORE_BASE64" ]; then \ 94 echo "$$ANDROID_KEYSTORE_BASE64" | base64 -d > my-release-key.keystore; \ 95 fi; \ 96 if [ ! -f my-release-key.keystore ]; then \ 97 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"; \ 98 fi 99 100.PHONY: android 101android: app .build/bundletool.jar 102 $(MAKE) android-release 103 $(MAKE) android-debug 104 105.PHONY: android-release 106android-release: .build/bundletool.jar android-keystore 107 export NODE_ENV=production \ 108 && cd ./js/app/android \ 109 && ./gradlew :app:bundleRelease \ 110 && cd - \ 111 && mv ./js/app/android/app/build/outputs/bundle/release/app-release.aab ./bin/streamplace-$(VERSION)-android-release.aab \ 112 && cd bin \ 113 && 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 \ 114 && unzip streamplace-$(VERSION)-android-release.apks && mv universal.apk streamplace-$(VERSION)-android-release.apk && rm toc.pb 115 116.PHONY: android-debug 117android-debug: .build/bundletool.jar android-keystore 118 export NODE_ENV=production \ 119 && cd ./js/app/android \ 120 && ./gradlew :app:bundleDebug \ 121 && cd - \ 122 && mv ./js/app/android/app/build/outputs/bundle/debug/app-debug.aab ./bin/streamplace-$(VERSION)-android-debug.aab \ 123 && cd bin \ 124 && 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 \ 125 && unzip streamplace-$(VERSION)-android-debug.apks && mv universal.apk streamplace-$(VERSION)-android-debug.apk && rm toc.pb 126 127.PHONY: ios 128ios: app 129 xcodebuild \ 130 -workspace ./js/app/ios/Streamplace.xcworkspace \ 131 -sdk iphoneos \ 132 -configuration Release \ 133 -scheme Streamplace \ 134 -archivePath ./bin/streamplace-$(VERSION)-ios-release.xcarchive \ 135 CODE_SIGN_IDENTITY=- \ 136 AD_HOC_CODE_SIGNING_ALLOWED=YES \ 137 CODE_SIGN_STYLE=Automatic \ 138 DEVELOPMENT_TEAM=ZZZZZZZZZZ \ 139 clean archive | xcpretty \ 140 && cd bin \ 141 && tar -czvf streamplace-$(VERSION)-ios-release.xcarchive.tar.gz streamplace-$(VERSION)-ios-release.xcarchive 142 143# _____ ____ 144# / ____|/ __ \ 145# | | __| | | | 146# | | |_ | | | | 147# | |__| | |__| | 148# \_____|\____/ 149 150.PHONY: rtcrec 151rtcrec: 152 go build -o $(BUILDDIR)/rtcrec ./pkg/rtcrec/cmd/... 153 154# Go takes care of this automatically but we can speed up the build by downloading go deps while the build is running 155.PHONY: godeps 156godeps: 157 go get ./pkg/... 158 159# __ __ ______ _____ ____ _ _ 160# | \/ | ____|/ ____|/ __ \| \ | | 161# | \ / | |__ | (___ | | | | \| | 162# | |\/| | __| \___ \| | | | . ` | 163# | | | | |____ ____) | |__| | |\ | 164# |_| |_|______|_____/ \____/|_| \_| 165 166BASE_OPTS = \ 167 --buildtype=debugoptimized \ 168 -D "gst-plugins-base:audioresample=enabled" \ 169 -D "gst-plugins-base:playback=enabled" \ 170 -D "gst-plugins-base:opus=enabled" \ 171 -D "gst-plugins-base:gio-typefinder=enabled" \ 172 -D "gst-plugins-base:videotestsrc=enabled" \ 173 -D "gst-plugins-base:videoconvertscale=enabled" \ 174 -D "gst-plugins-base:typefind=enabled" \ 175 -D "gst-plugins-base:compositor=enabled" \ 176 -D "gst-plugins-base:videorate=enabled" \ 177 -D "gst-plugins-base:app=enabled" \ 178 -D "gst-plugins-base:audiorate=enabled" \ 179 -D "gst-plugins-base:audiotestsrc=enabled" \ 180 -D "gst-plugins-base:audioconvert=enabled" \ 181 -D "gst-plugins-good:matroska=enabled" \ 182 -D "gst-plugins-good:multifile=enabled" \ 183 -D "gst-plugins-good:rtp=enabled" \ 184 -D "gst-plugins-bad:fdkaac=enabled" \ 185 -D "gst-plugins-bad:rtmp2=enabled" \ 186 -D "gst-plugins-good:audioparsers=enabled" \ 187 -D "gst-plugins-good:isomp4=enabled" \ 188 -D "gst-plugins-good:png=enabled" \ 189 -D "gst-plugins-good:videobox=enabled" \ 190 -D "gst-plugins-good:jpeg=enabled" \ 191 -D "gst-plugins-good:audioparsers=enabled" \ 192 -D "gst-plugins-bad:videoparsers=enabled" \ 193 -D "gst-plugins-bad:mpegtsmux=enabled" \ 194 -D "gst-plugins-bad:mpegtsdemux=enabled" \ 195 -D "gst-plugins-bad:codectimestamper=enabled" \ 196 -D "gst-plugins-bad:opus=enabled" \ 197 -D "gst-plugins-bad:rtmp2=enabled" \ 198 -D "gst-plugins-good:flv=enabled" \ 199 -D "gst-plugins-ugly:x264=enabled" \ 200 -D "gst-plugins-ugly:gpl=enabled" \ 201 -D "x264:asm=enabled" \ 202 -D "gstreamer-full:gst-full=enabled" \ 203 -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" \ 204 -D "gstreamer-full:gst-full-libraries=gstreamer-controller-1.0,gstreamer-plugins-base-1.0,gstreamer-pbutils-1.0" \ 205 -D "gstreamer-full:gst-full-elements=coreelements:concat,filesrc,filesink,queue,queue2,multiqueue,typefind,tee,capsfilter,fakesink,identity" \ 206 -D "gstreamer-full:bad=enabled" \ 207 -D "gstreamer-full:tls=disabled" \ 208 -D "gstreamer-full:libav=enabled" \ 209 -D "gstreamer-full:ugly=enabled" \ 210 -D "gstreamer-full:gpl=enabled" \ 211 -D "gstreamer-full:gst-full-typefind-functions=" \ 212 -D "gstreamer:coretracers=enabled" \ 213 -D "gstreamer-full:glib_assert=false" \ 214 -D "gstreamer:glib_assert=false" \ 215 -D "gst-plugins-good:glib_assert=false" \ 216 -D "gst-plugins-bad:glib_assert=false" \ 217 -D "gst-plugins-base:glib_assert=false" \ 218 -D "gst-plugins-ugly:glib_assert=false" \ 219 -D "glib:glib_assert=false" \ 220 -D "glib:glib_assert=false" \ 221 -D "gst-libav:glib_assert=false" \ 222 -D "gst-plugins-good:adaptivedemux2=disabled" \ 223 -D "gst-plugins-bad:codec2json=enabled" 224 225STATIC_OPTS = \ 226 $(BASE_OPTS) \ 227 -D "gstreamer-full:gst-full-target-type=static_library" \ 228 -D "gstreamer:registry=false" 229 230SHARED_OPTS = \ 231 $(BASE_OPTS) \ 232 -D "FFmpeg:default_library=shared" \ 233 -D "gstreamer:registry=true" 234 235.PHONY: meson 236meson: 237 $(MAKE) meson-setup 238 $(MAKE) meson-compile 239 240MESON_SETUP_OPTS?= 241.PHONY: meson-setup 242meson-setup: 243 @meson setup $(BUILDDIR) $(MESON_SETUP_OPTS) 244 @meson configure $(BUILDDIR) $(OPTS) 245 246.PHONY: meson-setup-static 247meson-setup-static: 248 @meson setup $(BUILDDIR) $(MESON_SETUP_OPTS) $(STATIC_OPTS) 249 @meson configure $(BUILDDIR) $(STATIC_OPTS) 250 251.PHONY: meson-compile 252meson-compile: 253 meson install -C $(BUILDDIR) 254 255 256# _____ _______ _______ _____ _____ 257# / ____|__ __|/\|__ __|_ _/ ____| 258# | (___ | | / \ | | | || | 259# \___ \ | | / /\ \ | | | || | 260# ____) | | |/ ____ \| | _| || |____ 261# |_____/ |_/_/ \_\_| |_____\_____| 262 263# Production distributions of Streamplace with bundled node and app. 264 265static: 266 $(MAKE) meson-setup meson-compile app OPTS=$(STATIC_OPTS) -j16 267 $(MAKE) streamplace 268 269.PHONY: static-test 270static-test: 271 go install github.com/jstemmer/go-junit-report/v2@latest \ 272 && PKG_CONFIG_PATH=$(shell realpath $(BUILDDIR)/meson-uninstalled) \ 273 bash -euo pipefail -c "go test -p 1 -timeout 300s ./pkg/... -v | tee /dev/stderr | go-junit-report -out test.xml" 274 275# _____ ________ __ 276# | __ \| ____\ \ / / 277# | | | | |__ \ \ / / 278# | | | | __| \ \/ / 279# | |__| | |____ \ / 280# |_____/|______| \/ 281 282# Local builds of Streamplace with node and app. 283 284.PHONY: dev-setup 285dev-setup: 286 $(MAKE) -j16 app-cached dev-setup-meson 287 288.PHONY: dev 289dev: app-cached $(LEXICON_STAMP) 290 if [ ! -d $(BUILDDIR) ]; then $(MAKE) dev-setup; fi 291 cp ./util/streamplace-dev.sh $(BUILDDIR)/streamplace 292 $(MAKE) dev-rust 293 PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \ 294 CGO_LDFLAGS="$(MACOS_VERSION_FLAG)" \ 295 LD_LIBRARY_PATH=$(BUILDDIR)/lib go build -tags mainnet -o $(BUILDDIR)/libstreamplace ./cmd/libstreamplace/... 296 297.PHONY: dev-setup-meson 298dev-setup-meson: 299 $(MAKE) dev-setup-meson-configure 300 $(MAKE) meson-compile 301 302.PHONY: dev-setup-meson-configure 303dev-setup-meson-configure: 304 meson setup --default-library=shared $(BUILDDIR) $(SHARED_OPTS) 305 meson configure --default-library=shared $(BUILDDIR) $(SHARED_OPTS) 306 307.PHONY: dev-rust 308dev-rust: .build/bin/uniffi-bindgen-go-forked 309 cargo build 310 EXT=so; \ 311 if [ "$(BUILDOS)" = "darwin" ]; then EXT=dylib; fi; \ 312 .build/bin/uniffi-bindgen-go-forked --out-dir pkg/iroh/generated --library ./target/debug/libiroh_streamplace.$$EXT \ 313 && mkdir -p $(BUILDDIR)/rust/iroh-streamplace/ \ 314 && mkdir -p $(BUILDDIR)/lib/ \ 315 && cp ./target/debug/libiroh_streamplace.$$EXT $(BUILDDIR)/rust/iroh-streamplace/libiroh_streamplace.$$EXT.tmp \ 316 && mv $(BUILDDIR)/rust/iroh-streamplace/libiroh_streamplace.$$EXT.tmp $(BUILDDIR)/rust/iroh-streamplace/libiroh_streamplace.$$EXT \ 317 && cp ./target/debug/libiroh_streamplace.$$EXT $(BUILDDIR)/lib/libiroh_streamplace.$$EXT.tmp \ 318 && mv $(BUILDDIR)/lib/libiroh_streamplace.$$EXT.tmp $(BUILDDIR)/lib/libiroh_streamplace.$$EXT 319 320.PHONY: dev-test 321dev-test: 322 go install github.com/jstemmer/go-junit-report/v2@latest \ 323 && PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \ 324 LD_LIBRARY_PATH=$(shell realpath $(BUILDDIR))/lib \ 325 CGO_LDFLAGS="-lm" \ 326 bash -euo pipefail -c "go test -p 1 -timeout 30m ./pkg/... -v | tee /dev/stderr | go-junit-report -out test.xml" 327 328.PHONY: iroh-test 329iroh-test: 330 $(MAKE) dev-rust 331 PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \ 332 LD_LIBRARY_PATH=$(shell realpath $(BUILDDIR))/lib \ 333 go build -o $(BUILDDIR)/iroh-test ./pkg/iroh/iroh_test/... 334 335# _ _____ _ _ _______ _____ _ _ _____ 336# | | |_ _| \ | |__ __|_ _| \ | |/ ____| 337# | | | | | \| | | | | | | \| | | __ 338# | | | | | . ` | | | | | | . ` | | |_ | 339# | |____ _| |_| |\ | | | _| |_| |\ | |__| | 340# |______|_____|_| \_| |_| |_____|_| \_|\_____| 341 342.PHONY: check 343check: install 344 $(MAKE) golangci-lint 345 pnpm run check 346 if [ "`gofmt -l . | wc -l`" -gt 0 ]; then echo 'gofmt failed, run make fix'; exit 1; fi 347 RUSTFLAGS="-D warnings" cargo check 348 349.PHONY: fix 350fix: 351 pnpm run fix 352 gofmt -w . 353 cargo fix --allow-dirty 354 355.PHONY: golangci-lint 356golangci-lint: 357 @PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \ 358 go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint run -c ./.golangci.yaml 359 360# _ ________ _______ _____ ____ _ _ _____ 361# | | | ____\ \ / /_ _/ ____/ __ \| \ | |/ ____| 362# | | | |__ \ V / | || | | | | | \| | (___ 363# | | | __| > < | || | | | | | . ` |\___ \ 364# | |____| |____ / . \ _| || |___| |__| | |\ |____) | 365# |______|______/_/ \_\_____\_____\____/|_| \_|_____/ 366 367# Mostly codegen for lexicons. 368 369.PHONY: lexicons 370lexicons: 371 $(MAKE) go-lexicons \ 372 && $(MAKE) js-lexicons \ 373 && $(MAKE) md-lexicons \ 374 && make fix 375 376.PHONY: go-lexicons 377go-lexicons: 378 rm -rf ./pkg/streamplace \ 379 && mkdir -p ./pkg/streamplace \ 380 && rm -rf ./pkg/streamplace/cbor_gen.go \ 381 && $(MAKE) lexgen \ 382 && sed -i.bak 's/\tlexutil\.RegisterType/\/\/\tlexutil.RegisterType/' $$(find ./pkg/streamplace -type f) \ 383 && go run golang.org/x/tools/cmd/goimports@latest -w $$(find ./pkg/streamplace -type f) \ 384 && go run ./pkg/gen/gen.go \ 385 && $(MAKE) lexgen \ 386 && find . | grep bak$$ | xargs rm \ 387 && rm -rf api 388 389.PHONY: js-lexicons 390js-lexicons: 391 node_modules/.bin/lex gen-api ./js/streamplace/src/lexicons $$(find ./lexicons -type f -name '*.json') --yes \ 392 && rm -rf ./js/streamplace/src/lexicons/types/com ./js/streamplace/src/lexicons/types/app \ 393 && sed -i.bak "s/^..port.*app\/bsky.*//g" $$(find ./js/streamplace/src/lexicons -type f) \ 394 && sed -i.bak "s/^..port.*com\/atproto.*//g" $$(find ./js/streamplace/src/lexicons -type f) \ 395 && sed -i.bak "s/\(..port .*\)\.js\(.*\)/\1\2/g" $$(find ./js/streamplace/src/lexicons -type f) \ 396 && sed -i.bak 's/AppBskyGraphBlock\.Main/AppBskyGraphBlock\.Record/' $$(find ./js/streamplace/src/lexicons/types/place/stream -type f) \ 397 && sed -i.bak 's/PlaceStreamMultistreamTarget\.Main/PlaceStreamMultistreamTarget\.Record/' $$(find ./js/streamplace/src/lexicons/types/place/stream -type f) \ 398 && sed -i.bak 's/PlaceStreamChatProfile\.Main/PlaceStreamChatProfile\.Record/' $$(find ./js/streamplace/src/lexicons/types/place/stream -type f) \ 399 && sed -i.bak 's/PlaceStreamLivestream\.Main/PlaceStreamLivestream\.Record/' $$(find ./js/streamplace/src/lexicons/types/place/stream/live -type f) \ 400 && for x in $$(find ./js/streamplace/src/lexicons -type f -name '*.ts'); do \ 401 echo 'import { ComAtprotoSyncGetRepo, AppBskyRichtextFacet, AppBskyGraphBlock, ComAtprotoRepoStrongRef, AppBskyActorDefs, ComAtprotoSyncListRepos, AppBskyActorGetProfile, AppBskyFeedGetFeedSkeleton, ComAtprotoIdentityResolveHandle, ComAtprotoModerationCreateReport, ComAtprotoRepoCreateRecord, ComAtprotoRepoDeleteRecord, ComAtprotoRepoDescribeRepo, ComAtprotoRepoGetRecord, ComAtprotoRepoListRecords, ComAtprotoRepoPutRecord, ComAtprotoRepoUploadBlob, ComAtprotoServerDescribeServer, ComAtprotoSyncGetRecord, ComAtprotoSyncListReposComAtprotoRepoCreateRecord, ComAtprotoRepoDeleteRecord, ComAtprotoRepoGetRecord, ComAtprotoRepoListRecords, ComAtprotoIdentityRefreshIdentity } from "@atproto/api"' >> $$x; \ 402 done \ 403 && npx prettier --ignore-unknown --write $$(find ./js/streamplace/src/lexicons -type f -name '*.ts') \ 404 && find . | grep bak$$ | xargs rm 405 406.PHONY: md-lexicons 407md-lexicons: 408 find "js/docs/src/content/docs/lex-reference" -type f -name '*.md' -delete \ 409 && pnpm exec lexmd \ 410 ./lexicons \ 411 .build/temp \ 412 subprojects/atproto/lexicons \ 413 js/docs/src/content/docs/lex-reference/openapi.json \ 414 && ls -R .build/temp \ 415 && cp -rf .build/temp/place/stream/* js/docs/src/content/docs/lex-reference/ \ 416 && rm -rf .build/temp \ 417 && $(MAKE) fix 418 419.PHONY: lexgen 420lexgen: 421 $(MAKE) lexgen-types 422 $(MAKE) lexgen-server 423 424.PHONY: lexgen-types 425lexgen-types: 426 go tool github.com/bluesky-social/indigo/cmd/lexgen \ 427 -outdir ./pkg/spxrpc \ 428 --build-file util/lexgen-types.json \ 429 --external-lexicons subprojects/atproto/lexicons \ 430 lexicons/place/stream \ 431 ./subprojects/atproto/lexicons 432 433.PHONY: lexgen-server 434lexgen-server: 435 mkdir -p ./pkg/spxrpc \ 436 && go tool github.com/bluesky-social/indigo/cmd/lexgen \ 437 --gen-server \ 438 --types-import place.stream:stream.place/streamplace/pkg/streamplace \ 439 --types-import app.bsky:github.com/bluesky-social/indigo/api/bsky \ 440 --types-import com.atproto:github.com/bluesky-social/indigo/api/atproto \ 441 --types-import chat.bsky:github.com/bluesky-social/indigo/api/chat \ 442 --types-import tools.ozone:github.com/bluesky-social/indigo/api/ozone \ 443 -outdir ./pkg/spxrpc \ 444 --build-file util/lexgen-types.json \ 445 --external-lexicons subprojects/atproto/lexicons \ 446 --package spxrpc \ 447 lexicons/place/stream \ 448 lexicons/app/bsky \ 449 lexicons/com/atproto 450 451.PHONY: ci-lexicons 452ci-lexicons: 453 $(MAKE) lexicons \ 454 && if ! git diff --exit-code >/dev/null; then echo "lexicons are out of date, run 'make lexicons' to fix"; git diff; exit 1; fi 455 456# _______ ______ _____ _______ _____ _ _ _____ 457# |__ __| ____|/ ____|__ __|_ _| \ | |/ ____| 458# | | | |__ | (___ | | | | | \| | | __ 459# | | | __| \___ \ | | | | | . ` | | |_ | 460# | | | |____ ____) | | | _| |_| |\ | |__| | 461# |_| |______|_____/ |_| |_____|_| \_|\_____| 462 463# test to make sure we haven't added any more dynamic dependencies 464LINUX_LINK_COUNT=5 465.PHONY: link-test-linux 466link-test-linux: 467 count=$(shell ldd ./build-linux-amd64/streamplace | wc -l) \ 468 && echo $$count \ 469 && if [ "$$count" != "$(LINUX_LINK_COUNT)" ]; then echo "ldd reports new libaries linked! want $(LINUX_LINK_COUNT) got $$count" \ 470 && ldd ./build-linux-amd64/streamplace \ 471 && exit 1; \ 472 fi 473 474MACOS_LINK_COUNT=10 475.PHONY: link-test-macos 476link-test-macos: 477 count=$(shell otool -L ./build-darwin-arm64/streamplace | wc -l | xargs) \ 478 && echo $$count \ 479 && if [ "$$count" != "$(MACOS_LINK_COUNT)" ]; then echo "otool -L reports new libaries linked! want $(MACOS_LINK_COUNT) got $$count" \ 480 && otool -L ./build-darwin-arm64/streamplace \ 481 && exit 1; \ 482 fi 483 484WINDOWS_LINK_COUNT=19 485.PHONY: link-test-windows 486link-test-windows: 487 count=$(shell x86_64-w64-mingw32-objdump -p ./build-windows-amd64/streamplace.exe | grep "DLL Name" | tr '[:upper:]' '[:lower:]' | sort | uniq | wc -l | xargs) \ 488 && echo $$count \ 489 && if [ "$$count" != "$(WINDOWS_LINK_COUNT)" ]; then echo "x86_64-w64-mingw32-objdump -p reports new libaries linked! want $(WINDOWS_LINK_COUNT) got $$count" \ 490 && x86_64-w64-mingw32-objdump -p ./build-windows-amd64/streamplace.exe | grep "DLL Name" \ 491 && exit 1; \ 492 fi 493 494.PHONY: ci 495ci: version install app node-all-platforms ci-upload-node 496 497 498.PHONY: ci-desktop-darwin 499ci-desktop-darwin: version install 500 ./util/mac-codesign.sh \ 501 && for arch in amd64 arm64; do \ 502 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 \ 503 && tar -xzvf streamplace-$(VERSION)-darwin-$$arch.tar.gz \ 504 && ./streamplace --version \ 505 && ./streamplace self-test \ 506 && mkdir -p build-darwin-$$arch \ 507 && mv ./streamplace ./build-darwin-$$arch/streamplace; \ 508 done \ 509 && $(MAKE) desktop-darwin \ 510 && for arch in amd64 arm64; do \ 511 export file=streamplace-desktop-$(VERSION)-darwin-$$arch.zip \ 512 && $(MAKE) ci-upload-file upload_file=$$file \ 513 && export file=streamplace-desktop-$(VERSION)-darwin-$$arch.dmg \ 514 && $(MAKE) ci-upload-file upload_file=$$file; \ 515 done 516 517.PHONY: ci-test 518ci-test: app 519 meson setup $(BUILDDIR) $(OPTS) 520 meson test -C $(BUILDDIR) go-tests 521 522.PHONY: ci-npm-release 523ci-npm-release: install 524 echo //registry.npmjs.org/:_authToken=$$NPM_TOKEN > ~/.npmrc \ 525 && npx lerna publish from-package --yes 526 527.build/bin/uniffi-bindgen-go-forked: 528 mkdir -p .build \ 529 && cargo install uniffi-bindgen-go --git https://github.com/kegsay/uniffi-bindgen-go --rev f1f1064871faf05377c75e098d525d530d402d38 --root .build \ 530 && mv .build/bin/uniffi-bindgen-go .build/bin/uniffi-bindgen-go-forked 531 532.build/bundletool.jar: 533 mkdir -p .build \ 534 && curl -L -o ./.build/bundletool.jar https://github.com/google/bundletool/releases/download/1.17.0/bundletool-all-1.17.0.jar 535 536.PHONY: selftest-macos 537selftest-macos: 538 js/desktop/out/Streamplace-darwin-arm64/Streamplace.app/Contents/MacOS/Streamplace -- --self-test 539 540# _____ _____ ____ _____ _____ 541# / ____| __ \ / __ \ / ____/ ____| 542# | | | |__) | | | | (___| (___ 543# | | | _ /| | | |\___ \\___ \ 544# | |____| | \ \| |__| |____) |___) | 545# \_____|_| \_\\____/|_____/_____/ 546# _____ ____ __ __ _____ _____ _ _____ _ _ _____ 547# / ____/ __ \| \/ | __ \_ _| | |_ _| \ | |/ ____| 548# | | | | | | \ / | |__) || | | | | | | \| | | __ 549# | | | | | | |\/| | ___/ | | | | | | | . ` | | |_ | 550# | |___| |__| | | | | | _| |_| |____ _| |_| |\ | |__| | 551# \_____\____/|_| |_|_| |_____|______|_____|_| \_|\_____| 552 553# Cross-compiling is exclusively right now from linux-amd64 to: 554 555# linux-amd64 (native) 556# linux-arm64 557# windows-amd64 558# darwin-amd64 559# darwin-arm64 560 561.PHONY: node-all-platforms 562node-all-platforms: app 563 meson setup build-linux-amd64 $(OPTS) --buildtype debugoptimized 564 meson compile -C build-linux-amd64 archive 565 $(MAKE) link-test-linux 566 $(MAKE) linux-arm64 567 $(MAKE) windows-amd64 568 $(MAKE) windows-amd64-startup-test 569 $(MAKE) desktop-linux 570 $(MAKE) desktop-windows-amd64 571 572.PHONY: desktop-linux 573desktop-linux: 574 $(MAKE) desktop-linux-amd64 575 $(MAKE) desktop-linux-arm64 576 577.PHONY: desktop-linux-amd64 578desktop-linux-amd64: 579 cd js/desktop \ 580 && pnpm run make --platform linux --arch x64 \ 581 && cd - \ 582 && mv "js/desktop/out/make/AppImage/x64/Streamplace-$(VERSION_ELECTRON)-x64.AppImage" ./bin/streamplace-desktop-$(VERSION)-linux-amd64.AppImage 583 584.PHONY: desktop-linux-arm64 585desktop-linux-arm64: 586 cd js/desktop \ 587 && pnpm run make --platform linux --arch arm64 \ 588 && cd - \ 589 && mv "js/desktop/out/make/AppImage/arm64/Streamplace-$(VERSION_ELECTRON)-arm64.AppImage" ./bin/streamplace-desktop-$(VERSION)-linux-arm64.AppImage 590 591.PHONY: desktop-windows-amd64 592desktop-windows-amd64: 593 cd js/desktop \ 594 && pnpm run make --platform win32 --arch x64 \ 595 && cd - \ 596 && export SUM=$$(cat ./js/desktop/out/make/squirrel.windows/x64/streamplace_desktop-$(VERSION_ELECTRON)-full.nupkg | openssl sha1 | awk '{ print $$2 }') \ 597 && echo $$SUM > ./bin/streamplace-desktop-$(VERSION)-windows-amd64.nupkg.sha1 \ 598 && mv "js/desktop/out/make/squirrel.windows/x64/streamplace_desktop-$(VERSION_ELECTRON)-full.nupkg" ./bin/streamplace-desktop-$(VERSION)-windows-amd64.$$SUM.nupkg \ 599 && mv "js/desktop/out/make/squirrel.windows/x64/Streamplace-$(VERSION_ELECTRON) Setup.exe" ./bin/streamplace-desktop-$(VERSION)-windows-amd64.exe 600 601.PHONY: streamplace 602streamplace: app-cached meson-setup-static 603 meson compile -C $(BUILDDIR) streamplace | grep -v drectve 604 605.PHONY: archive 606archive: app-cached meson-setup-static godeps 607 meson compile -C $(BUILDDIR) archive | grep -v drectve 608 609.PHONY: linux-amd64 610linux-amd64: 611 $(MAKE) -j $(shell nproc) archive 612 $(MAKE) link-test-linux 613 614.PHONY: linux-arm64 615linux-arm64: 616 rustup target add aarch64-unknown-linux-gnu \ 617 && CC=aarch64-linux-gnu-gcc \ 618 LD=aarch64-linux-gnu-ld \ 619 CROSS_COMPILE=1 \ 620 MESON_SETUP_OPTS="--cross-file util/linux-arm64-gnu.ini" \ 621 BUILDDIR=build-linux-arm64 \ 622 CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \ 623 $(MAKE) -j $(shell nproc) archive 624 625.PHONY: windows-amd64 626windows-amd64: 627 rustup target add x86_64-pc-windows-gnu \ 628 && CC=x86_64-w64-mingw32-gcc \ 629 LD=x86_64-w64-mingw32-ld \ 630 CROSS_COMPILE=1 \ 631 MESON_SETUP_OPTS="--cross-file util/windows-amd64-gnu.ini" \ 632 BUILDDIR=build-windows-amd64 \ 633 $(MAKE) -j $(shell nproc) archive 634 635.PHONY: darwin-amd64 636darwin-amd64: 637 export CC=x86_64-apple-darwin24.4-clang \ 638 && export CC_X86_64_APPLE_DARWIN=x86_64-apple-darwin24.4-clang \ 639 && export CXX_X86_64_APPLE_DARWIN=x86_64-apple-darwin24.4-clang++ \ 640 && export AR_X86_64_APPLE_DARWIN=x86_64-apple-darwin24.4-ar \ 641 && export CARGO_TARGET_X86_64_APPLE_DARWIN_LINKER=x86_64-apple-darwin24.4-clang \ 642 && export LD=x86_64-apple-darwin24.4-ld \ 643 && export CROSS_COMPILE=1 \ 644 && export MESON_SETUP_OPTS="--cross-file util/osxcross-darwin-amd64.ini" \ 645 && export BUILDDIR=build-darwin-amd64 \ 646 && $(MAKE) -j $(shell nproc) streamplace \ 647 && ./util/osxcross-codesign.sh ./build-darwin-amd64/streamplace \ 648 && mkdir -p bin \ 649 && cd build-darwin-amd64 \ 650 && tar -czvf ../bin/streamplace-$(VERSION)-darwin-amd64.tar.gz ./streamplace \ 651 && cd - 652 653.PHONY: darwin-arm64gofmt -w . 654darwin-arm64: 655 export CC=aarch64-apple-darwin24.4-clang \ 656 && export CC_AARCH64_APPLE_DARWIN=aarch64-apple-darwin24.4-clang \ 657 && export CXX_AARCH64_APPLE_DARWIN=aarch64-apple-darwin24.4-clang++ \ 658 && export AR_AARCH64_APPLE_DARWIN=aarch64-apple-darwin24.4-ar \ 659 && export CARGO_TARGET_AARCH64_APPLE_DARWIN_LINKER=aarch64-apple-darwin24.4-clang \ 660 && export LD=aarch64-apple-darwin24.4-ld \ 661 && export CROSS_COMPILE=1 \ 662 && export MESON_SETUP_OPTS="--cross-file util/osxcross-darwin-arm64.ini" \ 663 && export BUILDDIR=build-darwin-arm64 \ 664 && $(MAKE) -j $(shell nproc) streamplace \ 665 && ./util/osxcross-codesign.sh ./build-darwin-arm64/streamplace \ 666 && mkdir -p bin \ 667 && cd build-darwin-arm64 \ 668 && tar -czvf ../bin/streamplace-$(VERSION)-darwin-arm64.tar.gz ./streamplace \ 669 && cd - 670 671# unbuffer here is a workaround for wine trying to pop up a terminal window and failing 672.PHONY: windows-amd64-startup-test 673windows-amd64-startup-test: 674 bash -c 'set -euo pipefail && unbuffer wine64 ./build-windows-amd64/streamplace.exe self-test | cat' 675 676.PHONY: desktop-darwin-amd64 677desktop-darwin-amd64: 678 echo "TODO" 679 680.PHONY: desktop-darwin-arm64 681desktop-darwin-arm64: 682 echo "TODO" 683 684.PHONY: desktop-darwin 685desktop-darwin: 686 export DEBUG="electron-osx-sign*" \ 687 && cd js/desktop \ 688 && pnpm run make --platform darwin --arch arm64 \ 689 && pnpm run make --platform darwin --arch x64 \ 690 && cd - \ 691 && mv js/desktop/out/make/Streamplace-$(VERSION_ELECTRON)-x64.dmg ./bin/streamplace-desktop-$(VERSION)-darwin-amd64.dmg \ 692 && mv js/desktop/out/make/Streamplace-$(VERSION_ELECTRON)-arm64.dmg ./bin/streamplace-desktop-$(VERSION)-darwin-arm64.dmg \ 693 && mv js/desktop/out/make/zip/darwin/x64/Streamplace-darwin-x64-$(VERSION_ELECTRON).zip ./bin/streamplace-desktop-$(VERSION)-darwin-amd64.zip \ 694 && mv js/desktop/out/make/zip/darwin/arm64/Streamplace-darwin-arm64-$(VERSION_ELECTRON).zip ./bin/streamplace-desktop-$(VERSION)-darwin-arm64.zip 695 696# link your local version of mist for dev 697.PHONY: link-mist 698link-mist: 699 rm -rf subprojects/mistserver 700 ln -s $$(realpath ../mistserver) ./subprojects/mistserver 701 702# link your local version of gstreamer 703.PHONY: link-gstreamer 704link-gstreamer: 705 rm -rf subprojects/gstreamer-full 706 ln -s $$(realpath ../gstreamer) ./subprojects/gstreamer-full 707 708# link your local version of ffmpeg for dev 709.PHONY: link-ffmpeg 710link-ffmpeg: 711 rm -rf subprojects/FFmpeg 712 ln -s $$(realpath ../ffmpeg) ./subprojects/FFmpeg 713 714# _____ ____ _____ _ ________ _____ 715# | __ \ / __ \ / ____| |/ / ____| __ \ 716# | | | | | | | | | ' /| |__ | |__) | 717# | | | | | | | | | < | __| | _ / 718# | |__| | |__| | |____| . \| |____| | \ \ 719# |_____/ \____/ \_____|_|\_\______|_| \_\ 720 721# Actually, Podman. I'm not sure if these commands will actually run on Docker, untested. 722 723.PHONY: docker 724docker: 725 docker build -f docker/local.Dockerfile -t dist.stream.place/streamplace/streamplace:local . 726 727.PHONY: docker-build 728docker-build: docker-build-builder docker-build-in-container 729 730.PHONY: docker-test 731docker-test: docker-build-builder docker-test-in-container 732 733DOCKER_BUILD_OPTS?= 734BUILDER_TARGET?=builder 735.PHONY: docker-build-builder 736docker-build-builder: 737 podman build --target=$(BUILDER_TARGET) --os=linux --arch=amd64 -f docker/build.Dockerfile -t dist.stream.place/streamplace/streamplace:$(BUILDER_TARGET) $(DOCKER_BUILD_OPTS) . 738 739.PHONY: precommit 740precommit: dockerfile-hash-precommit 741 742.PHONY: dockefile-hash-precommit 743dockerfile-hash-precommit: 744 @bash -c 'printf "variables:\n DOCKERFILE_HASH: `git hash-object docker/build.Dockerfile`" > .ci/dockerfile-hash.yaml' \ 745 && git add .ci/dockerfile-hash.yaml 746 747# tricks the github action for golangci-lint to run inside a container 748.PHONY: golangci-lint-container 749golangci-lint-container: docker-build-builder 750 podman run \ 751 -v $$(pwd):$$(pwd) \ 752 -w $$(pwd) \ 753 -e PKG_CONFIG_PATH=$$(pwd)/build-linux-amd64/lib/pkgconfig \ 754 -d \ 755 --name golangci-lint \ 756 dist.stream.place/streamplace/streamplace:$(BUILDER_TARGET) \ 757 tail -f /dev/null 758 podman exec golangci-lint mkdir -p js/app/dist 759 podman exec golangci-lint touch js/app/dist/index.html 760 podman exec golangci-lint mkdir -p .build 761 podman exec golangci-lint touch .build/lexicon-stamp 762 podman exec golangci-lint make dev 763 764# runs a command in the build container, building if necessary 765IN_CONTAINER_CMD?=echo 'usage: make in-container IN_CONTAINER_CMD=\"<command>\"' 766DOCKER_BIN?=podman 767DOCKER_REF?=dist.stream.place/streamplace/streamplace:$(BUILDER_TARGET) 768DOCKER_OPTS?= 769.PHONY: in-container 770in-container: docker-build-builder 771 $(DOCKER_BIN) run $(DOCKER_OPTS) -v $$(pwd):$$(pwd) -w $$(pwd) --rm $(DOCKER_REF) bash -c "$(IN_CONTAINER_CMD)" 772 773.PHONY: docker-shell 774docker-shell: 775 $(MAKE) in-container IN_CONTAINER_CMD="bash" DOCKER_OPTS="-it -v $$(pwd):$$(pwd) -w $$(pwd)" 776 777STREAMPLACE_URL?=https://git.stream.place/streamplace/streamplace/-/package_files/10122/download 778.PHONY: docker-release 779docker-release: 780 cd docker \ 781 && docker build -f release.Dockerfile \ 782 --build-arg TARGETARCH=$(BUILDARCH) \ 783 --build-arg STREAMPLACE_URL=$(STREAMPLACE_URL) \ 784 -t dist.stream.place/streamplace/streamplace \ 785 . 786 787.PHONY: docker-mistserver 788docker-mistserver: 789 cd docker \ 790 && docker build -f mistserver.Dockerfile \ 791 --build-arg TARGETARCH=$(BUILDARCH) \ 792 --build-arg STREAMPLACE_URL=$(STREAMPLACE_URL) \ 793 -t dist.stream.place/streamplace/streamplace:mistserver \ 794 795# _____ _____ _____ _______ _____ ____ 796# | __ \_ _|/ ____|__ __| __ \ / __ \ 797# | | | || | | (___ | | | |__) | | | | 798# | | | || | \___ \ | | | _ /| | | | 799# | |__| || |_ ____) | | | | | \ \| |__| | 800# |_____/_____|_____/ |_| |_| \_\\____/ 801 802# distro: cut new versions, build apt and brew packages, upload to S3/gitlab 803 804.PHONY: release 805release: install 806 $(MAKE) lexicons 807 pnpm run release 808 809.PHONY: ci-release 810ci-release: 811 go install gitlab.com/gitlab-org/release-cli/cmd/release-cli 812 go run ./pkg/config/git/git.go -release -o release.yml 813 release-cli create-from-file --file release.yml 814 815.PHONY: homebrew 816homebrew: 817 $(MAKE) ci-download-file download_file=streamplace-$(VERSION)-linux-amd64.tar.gz 818 $(MAKE) ci-download-file download_file=streamplace-$(VERSION)-linux-arm64.tar.gz 819 $(MAKE) ci-download-file download_file=streamplace-$(VERSION)-darwin-amd64.tar.gz 820 $(MAKE) ci-download-file download_file=streamplace-$(VERSION)-darwin-arm64.tar.gz 821 git clone git@github.com:streamplace/homebrew-streamplace.git /tmp/homebrew-streamplace 822 go run ./pkg/config/git/git.go -homebrew -o /tmp/homebrew-streamplace/Formula/streamplace.rb 823 824.PHONY: ci-homebrew 825ci-homebrew: 826 git config --global user.name "Streamplace Homebrew Robot" 827 git config --global user.email support@stream.place 828 mkdir -p ~/.ssh 829 echo "Host * \n\ 830 StrictHostKeyChecking no \n\ 831 UserKnownHostsFile=/dev/null" > ~/.ssh/config 832 echo "$$CI_HOMEBREW_KEY_BASE64" | base64 -d > ~/.ssh/id_ed25519 833 chmod 600 ~/.ssh/id_ed25519 834 835 chmod 600 ~/.ssh/config 836 $(MAKE) homebrew 837 cd /tmp/homebrew-streamplace \ 838 && git add . \ 839 && git commit -m "Update streamplace $(VERSION)" \ 840 && git push 841 842FPM_BASE_OPTS= \ 843 -s dir \ 844 -t deb \ 845 -v $(VERSION_NO_V) \ 846 --force \ 847 --license=GPL-3.0-or-later \ 848 --maintainer="Streamplace <support@stream.place>" \ 849 --vendor="Streamplace" \ 850 --url="https://stream.place" 851SP_ARCH_NAME?=amd64 852.PHONY: deb-pkg 853deb-pkg: 854 fpm $(FPM_BASE_OPTS) \ 855 -n streamplace \ 856 -a $(SP_ARCH_NAME) \ 857 -p bin/streamplace-$(VERSION)-linux-$(SP_ARCH_NAME).deb \ 858 --deb-systemd=util/systemd/streamplace.service \ 859 --deb-systemd-restart-after-upgrade \ 860 --after-install=util/systemd/after-install.sh \ 861 --description="Live video for the AT Protocol. Solving video for everybody forever." \ 862 build-linux-$(SP_ARCH_NAME)/streamplace=/usr/bin/streamplace 863 864.PHONY: pkg-linux-amd64 865pkg-linux-amd64: 866 $(MAKE) deb-pkg SP_ARCH_NAME=amd64 867 868.PHONY: pkg-linux-arm64 869pkg-linux-arm64: 870 $(MAKE) deb-pkg SP_ARCH_NAME=arm64 871 872.PHONY: pkg-darwin-amd64 873pkg-darwin-amd64: 874 echo todo 875 876.PHONY: pkg-darwin-arm64 877pkg-darwin-arm64: 878 echo todo 879 880.PHONY: pkg-windows-amd64 881pkg-windows-amd64: 882 echo todo 883 884.PHONY: deb-release 885deb-release: 886 aptly repo create -distribution=all -component=main streamplace-releases 887 aptly mirror create old-version $$S3_PUBLIC_URL/debian all 888 aptly mirror update old-version 889 aptly repo import old-version streamplace-releases streamplace 890 aptly repo add streamplace-releases \ 891 bin/streamplace-$(VERSION)-linux-arm64.deb \ 892 bin/streamplace-$(VERSION)-linux-amd64.deb 893 aptly snapshot create streamplace-$(VERSION) from repo streamplace-releases 894 aptly publish snapshot -distribution=all streamplace-$(VERSION) s3:streamplace-releases: 895 896.PHONY: ci-deb-release 897ci-deb-release: 898 $(MAKE) ci-download-file download_file=streamplace-$(VERSION)-linux-amd64.deb 899 $(MAKE) ci-download-file download_file=streamplace-$(VERSION)-linux-arm64.deb 900 echo $$CI_SIGNING_KEY_BASE64 | base64 -d | gpg --import 901 gpg --armor --export | gpg --no-default-keyring --keyring trustedkeys.gpg --import 902 echo '{"S3PublishEndpoints":{"streamplace-releases":{"region":"'$$S3_REGION'","bucket":"'$$S3_BUCKET_NAME'","endpoint":"'$$S3_ENDPOINT'","acl":"public-read","prefix":"debian"}}}' > ~/.aptly.conf 903 $(MAKE) deb-release 904 905# _____ _____ 906# / ____|_ _| 907# | | | | 908# | | | | 909# | |____ _| |_ 910# \_____|_____| 911 912# mostly "do a thing and then gitlab upload the artifact" 913 914.PHONY: ci-upload 915ci-upload: ci-upload-node ci-upload-android 916 917.PHONY: ci-upload-node-linux-amd64 918ci-upload-node-linux-amd64: 919 $(MAKE) ci-upload-file upload_file=streamplace-$(VERSION)-linux-amd64.tar.gz \ 920 && $(MAKE) ci-upload-file upload_file=streamplace-desktop-$(VERSION)-linux-amd64.AppImage \ 921 && $(MAKE) ci-upload-file upload_file=streamplace-$(VERSION)-linux-amd64.deb 922 923.PHONY: ci-upload-node-linux-arm64 924ci-upload-node-linux-arm64: 925 $(MAKE) ci-upload-file upload_file=streamplace-$(VERSION)-linux-arm64.tar.gz \ 926 && $(MAKE) ci-upload-file upload_file=streamplace-desktop-$(VERSION)-linux-arm64.AppImage \ 927 && $(MAKE) ci-upload-file upload_file=streamplace-$(VERSION)-linux-arm64.deb 928 929.PHONY: ci-upload-node-darwin-arm64 930ci-upload-node-darwin-arm64: 931 export file=streamplace-$(VERSION)-darwin-arm64.tar.gz \ 932 && $(MAKE) ci-upload-file upload_file=$$file; 933 934.PHONY: ci-upload-node-darwin-amd64 935ci-upload-node-darwin-amd64: 936 export file=streamplace-$(VERSION)-darwin-amd64.tar.gz \ 937 && $(MAKE) ci-upload-file upload_file=$$file; 938 939.PHONY: ci-upload-node-windows-amd64 940ci-upload-node-windows-amd64: 941 export file=streamplace-$(VERSION)-windows-amd64.zip \ 942 && $(MAKE) ci-upload-file upload_file=$$file; \ 943 export file=streamplace-desktop-$(VERSION)-windows-amd64.exe \ 944 && $(MAKE) ci-upload-file upload_file=$$file; \ 945 export SUM=$$(cat bin/streamplace-desktop-$(VERSION)-windows-amd64.nupkg.sha1) \ 946 && export file=streamplace-desktop-$(VERSION)-windows-amd64.$$SUM.nupkg \ 947 && $(MAKE) ci-upload-file upload_file=$$file; 948 949.PHONY: ci-upload-node-macos 950ci-upload-node-macos: node-all-platforms-macos 951 for GOOS in darwin; do \ 952 for GOARCH in amd64 arm64; do \ 953 export file=streamplace-$(VERSION)-$$GOOS-$$GOARCH.tar.gz \ 954 && $(MAKE) ci-upload-file upload_file=$$file; \ 955 export file=streamplace-desktop-$(VERSION)-$$GOOS-$$GOARCH.dmg \ 956 && $(MAKE) ci-upload-file upload_file=$$file; \ 957 export file=streamplace-desktop-$(VERSION)-$$GOOS-$$GOARCH.zip \ 958 && $(MAKE) ci-upload-file upload_file=$$file; \ 959 done \ 960 done; 961 962.PHONY: ci-upload-android 963ci-upload-android: android 964 $(MAKE) ci-upload-android-debug \ 965 && $(MAKE) ci-upload-android-release 966 967.PHONY: ci-upload-android-debug 968ci-upload-android-debug: 969 $(MAKE) ci-upload-file upload_file=streamplace-$(VERSION)-android-debug.apk \ 970 && $(MAKE) ci-upload-file upload_file=streamplace-$(VERSION)-android-debug.aab 971 972.PHONY: ci-upload-android-release 973ci-upload-android-release: 974 $(MAKE) ci-upload-file upload_file=streamplace-$(VERSION)-android-release.apk \ 975 && $(MAKE) ci-upload-file upload_file=streamplace-$(VERSION)-android-release.aab 976 977.PHONY: ci-upload-ios 978ci-upload-ios: ios 979 $(MAKE) ci-upload-file upload_file=streamplace-$(VERSION)-ios-release.xcarchive.tar.gz 980 981upload_file?="" 982.PHONY: ci-upload-file 983ci-upload-file: 984 curl \ 985 --fail-with-body \ 986 --header "JOB-TOKEN: $$CI_JOB_TOKEN" \ 987 --upload-file bin/$(upload_file) \ 988 "$$CI_API_V4_URL/projects/$$CI_PROJECT_ID/packages/generic/$(BRANCH)/$(VERSION)/$(upload_file)"; 989 990download_file?="" 991.PHONY: ci-download-file 992ci-download-file: 993 curl \ 994 --fail-with-body \ 995 --header "JOB-TOKEN: $$CI_JOB_TOKEN" \ 996 -o bin/$(download_file) \ 997 "$$CI_API_V4_URL/projects/$$CI_PROJECT_ID/packages/generic/$(BRANCH)/$(VERSION)/$(download_file)"; 998 999.PHONY: c2pa-types 1000c2pa-types: 1001 $(MAKE) dev-rust 1002 ./target/debug/export_c2pa_schema 1003 npx quicktype --lang go --src-lang schema --package c2patypes --out pkg/c2patypes/c2patypes.go ./target/schema/C2PA.schema.json 1004 gofmt -w pkg/c2patypes/c2patypes.go