Initial QSfera import
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
SHELL := bash
|
||||
NAME := web
|
||||
WEB_ASSETS_VERSION = v7.0.1
|
||||
WEB_ASSETS_BRANCH = main
|
||||
|
||||
ifneq (, $(shell command -v go 2> /dev/null)) # suppress `command not found warnings` for non go targets in CI
|
||||
include ../../.bingo/Variables.mk
|
||||
endif
|
||||
|
||||
include ../../.make/default.mk
|
||||
include ../../.make/go.mk
|
||||
include ../../.make/release.mk
|
||||
include ../../.make/docs.mk
|
||||
|
||||
.PHONY: node-generate-dev
|
||||
node-generate-dev: pull-assets
|
||||
|
||||
.PHONY: node-generate-prod
|
||||
node-generate-prod: download-assets
|
||||
|
||||
|
||||
.PHONY: pull-assets
|
||||
pull-assets:
|
||||
echo "using unreleased assets from branch $(WEB_ASSETS_BRANCH), this should not be used for official releases"
|
||||
if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then git clean -xfd assets/core; else rm -rf assets/core; fi
|
||||
mkdir -p assets/core
|
||||
@if [ ! -d tmp/assets/core/origin ]; then \
|
||||
echo "no web assets found, initializing"; \
|
||||
git clone -b main --depth 1 https://github.com/opencloud-eu/web.git tmp/assets/core/origin; \
|
||||
else \
|
||||
echo "web assets found, updating"; \
|
||||
cd tmp/assets/core/origin; \
|
||||
if [[ `git status --porcelain` ]]; then echo "There are uncommitted changes in tmp/assets/core/origin"; exit 1; fi; \
|
||||
git checkout $(WEB_ASSETS_BRANCH); \
|
||||
git pull; \
|
||||
fi;
|
||||
make -C tmp/assets/core/origin release
|
||||
tar xfv tmp/assets/core/origin/release/web.tar.gz -C assets/core/
|
||||
mkdir -p ../../third-party-licenses/node/web
|
||||
tar xfv tmp/assets/core/origin/release/third-party-licenses.tar.gz -C ../../third-party-licenses/node/web/
|
||||
|
||||
.PHONY: download-assets
|
||||
download-assets:
|
||||
if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then git clean -xfd assets/core; else rm -rf assets/core; fi
|
||||
mkdir -p assets/core
|
||||
curl --fail -slL -o- https://github.com/opencloud-eu/web/releases/download/$(WEB_ASSETS_VERSION)/web.tar.gz | tar xzf - -C assets/core/
|
||||
|
||||
.PHONY: ci-node-save-licenses
|
||||
ci-node-save-licenses:
|
||||
@mkdir -p ../../third-party-licenses/node/web
|
||||
@curl --fail -slL -o- https://github.com/opencloud-eu/web/releases/download/$(WEB_ASSETS_VERSION)/third-party-licenses.tar.gz | tar xzf - -C ../../third-party-licenses/node/web
|
||||
Reference in New Issue
Block a user