1
0
mirror of https://github.com/owncloud/ocis.git synced 2026-10-23 23:29:02 +03:00
Files
ocis/services/web/Makefile
donmor 36d5089424 Generate web timestamp by env/git log; make it buildable without .git (#12758)
* fix(web): generate web timestamp by env SOURCE_DATE_EPOCH or git log (#12757)

* fix(web): suppress error when make in non-git directory (e.g. source tarballs)

* chore: add changelog for pull 12758

* fix(web): fix env description in changelog; remove cwd from execSync

* fix(web): fix format (prettier check)
2026-08-12 09:03:26 +02:00

50 lines
1.4 KiB
Makefile

SHELL := bash
NAME := web
WEB_DIR := ../../web
include ../../.make/recursion.mk
############ tooling ############
ifneq (, $(shell command -v go 2> /dev/null)) # suppress `command not found warnings` for non go targets in CI
include ../../.bingo/Variables.mk
endif
############ go tooling ############
include ../../.make/go.mk
############ release #########
include ../../.make/release.mk
############ docs generate ############
include ../../.make/docs.mk
.PHONY: docs-generate
docs-generate: config-docs-generate
############ generate ############
include ../../.make/generate.mk
.PHONY: ci-go-generate
ci-go-generate: # CI runs ci-node-generate automatically before this target
.PHONY: ci-node-generate
ci-node-generate: build-assets
.PHONY: build-assets
build-assets:
cd $(WEB_DIR) && pnpm install && pnpm check:types && pnpm build
cp $(WEB_DIR)/config/config.json.dist $(WEB_DIR)/dist/
if ! git status > /dev/null; then echo 'Re-extract the source to a clean directory to avoid leftover files.'; else git clean -xfd assets; fi
cp -r $(WEB_DIR)/dist/. assets/core/
############ licenses ############
.PHONY: ci-node-check-licenses
ci-node-check-licenses:
cd $(WEB_DIR) && pnpm licenses:check
.PHONY: ci-node-save-licenses
ci-node-save-licenses:
@mkdir -p ../../third-party-licenses/node/web
cd $(WEB_DIR) && pnpm licenses:csv && pnpm licenses:save
cp -r $(WEB_DIR)/third-party-licenses/third-party-licenses/. ../../third-party-licenses/node/web/