From ae443735733f53d528d47369b6c9124831f4138b Mon Sep 17 00:00:00 2001 From: SebastianKrupinski Date: Mon, 24 Aug 2026 19:56:37 -0400 Subject: [PATCH] chore: convert build workflow to makefile Signed-off-by: SebastianKrupinski --- .nextcloudignore | 38 ------------------------- Makefile | 73 ++++++++++++++++++++++++++++++++++++++++++++++++ krankerl.toml | 6 ---- 3 files changed, 73 insertions(+), 44 deletions(-) delete mode 100644 .nextcloudignore create mode 100644 Makefile delete mode 100644 krankerl.toml diff --git a/.nextcloudignore b/.nextcloudignore deleted file mode 100644 index 87e4b14..0000000 --- a/.nextcloudignore +++ /dev/null @@ -1,38 +0,0 @@ -# SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: AGPL-3.0-or-later -/build -/composer.* -/CONTRIBUTING.md -.git -.gitattributes -.github -.gitignore -/krankerl.toml -/l10n/no-php -/.tx -/.nextcloudignore -/.php_cs.dist -/.php-cs-fixer.cache -/.php-cs-fixer.dist.php -/phpstan.neon -/phpunit*xml -/psalm.xml -/tests -/vendor/bin -/vendor-bin -/.git-blame-ignore-revs -/node_modules -/src -/package.json -/package-lock.json -/vite.config.mjs -/node_modules -/src -/package.json -/package-lock.json -/vite.config.mjs -/tsconfig.json -/stylelint.config.js -/eslint.config.mjs -/renovate.json -/REUSE.toml \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..cc5dd01 --- /dev/null +++ b/Makefile @@ -0,0 +1,73 @@ +# SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: AGPL-3.0-or-later + +app_name=calendar_resource_management + +project_dir=$(CURDIR) +build_dir=$(CURDIR)/build/artifacts +appstore_dir=$(build_dir)/$(app_name) +package_name=$(build_dir)/$(app_name).tar.gz + +# Tools (override on the command line if needed, e.g. `make composer-install COMPOSER=composer2`) +COMPOSER=composer +NPM=npm + +.PHONY: all +all: build + +# Install all dependencies and build the production frontend assets. +.PHONY: build +build: composer-install build-js-production + +# PHP runtime dependencies only (no dev tooling ends up in the package). +.PHONY: composer-install +composer-install: + $(COMPOSER) install --no-dev --prefer-dist --optimize-autoloader + +# Compile the frontend bundle into js/. +.PHONY: build-js-production +build-js-production: + $(NPM) ci + $(NPM) run build --if-present + +# Remove all build output. +.PHONY: clean +clean: + rm -rf $(build_dir) + +# Assemble a clean copy of the app and package it for the Nextcloud App Store. +# NOTE: this only packages what is already present in the working tree. Run +# `make build` (or the CI build steps) first so js/ and vendor/ are populated. +.PHONY: appstore +appstore: clean + mkdir -p $(appstore_dir) + rsync -a \ + --exclude='/build' \ + --exclude='/.git' \ + --exclude='/.github' \ + --exclude='/.git-blame-ignore-revs' \ + --exclude='/.gitignore' \ + --exclude='/node_modules' \ + --exclude='/src' \ + --exclude='/tests' \ + --exclude='*.cache' \ + --exclude='*.log' \ + --exclude='*.log.*' \ + --exclude='/renovate.json' \ + --exclude='/REUSE.toml' \ + --exclude='/eslint.config.mjs' \ + --exclude='/stylelint.config.js' \ + --exclude='/vite.config.mjs' \ + --exclude='/tsconfig.json' \ + --exclude='/phpstan.neon' \ + --exclude='/.php-cs-fixer.dist.php' \ + --exclude='/.php-cs-fixer.cache' \ + --exclude='/package.json' \ + --exclude='/package-lock.json' \ + --exclude='/composer.json' \ + --exclude='/composer.lock' \ + --exclude='/vendor/bin' \ + --exclude='/vendor-bin' \ + --exclude='/Makefile' \ + $(project_dir)/ $(appstore_dir)/ + tar -czf $(package_name) -C $(build_dir) $(app_name) diff --git a/krankerl.toml b/krankerl.toml deleted file mode 100644 index 3eb42a0..0000000 --- a/krankerl.toml +++ /dev/null @@ -1,6 +0,0 @@ -# SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors -# SPDX-License-Identifier: AGPL-3.0-or-later -[package] -before_cmds = [ - "composer install --no-dev -o", -]