diff --git a/Makefile b/Makefile index 9174fb0..731b39f 100644 --- a/Makefile +++ b/Makefile @@ -163,6 +163,7 @@ source: # appstore: # - Create an App Store tarball (strips tests, dotfiles, dev configs) +# - Installs only production dependencies (no dev deps) # - Output: build/artifacts/appstore/$(app_name).tar.gz .PHONY: appstore appstore: @@ -170,7 +171,10 @@ appstore: mkdir -p $(app_intermediate_directory) mkdir -p $(appstore_build_directory) rm -rf $(appstore_package_name).tar.gz - rsync -vtr \ + @echo "Installing production dependencies only..." + rm -rf vendor + $(composer_bin) install --no-dev --prefer-dist --optimize-autoloader + rsync -vtr --delete \ --exclude="**/.git/**/*" \ --exclude="**/.github/**/*" \ --exclude="build" \ @@ -178,8 +182,10 @@ appstore: --exclude="Makefile" \ --exclude="*.log" \ --exclude="phpunit*xml" \ + --exclude="psalm.xml" \ --exclude="composer.*" \ --exclude="node_modules" \ + --exclude="vendor-bin" \ --exclude="dist/js/node_modules" \ --exclude="dist/js/tests" \ --exclude="dist/js/test" \ @@ -189,17 +195,23 @@ appstore: --exclude="dist/js/karma.*" \ --exclude="dist/js/protractor.*" \ --exclude="package.json" \ + --exclude="pnpm-lock.yaml" \ --exclude="bower.json" \ --exclude="karma.*" \ --exclude="protractor\.*" \ --exclude="/gen" \ --exclude="/.*" \ - --exclude="dist/js/.*" \ --exclude="/src" \ --exclude="rename-template.sh" \ + --exclude="*.config.cjs" \ + --exclude="*.config.js" \ + --exclude="*.config.ts" \ + --exclude="tsconfig*.json" \ $(CURDIR)/ $(app_intermediate_directory) cd $(CURDIR)/build/artifacts/intermediate && \ tar czf $(appstore_package_name).tar.gz $(app_name) + @echo "Restoring dev dependencies..." + $(composer_bin) install --prefer-dist # test: # - Run PHP unit tests locally with a configured Nextcloud installation diff --git a/composer.json b/composer.json index 1c8b512..86bcc61 100644 --- a/composer.json +++ b/composer.json @@ -1,26 +1,20 @@ { - "name": "nextcloud/nextcloudapptemplate", - "description": "Enter your app summary here.", + "name": "nextcloud/forum", + "description": "A community-driven forum built right into your Nextcloud instance", "license": "AGPL-3.0-or-later", "authors": [ { - "name": "Your Name", - "email": "your@email.com", - "homepage": "https://your.website" + "name": "Chen Asraf", + "email": "contact@casraf.dev", + "homepage": "https://casraf.dev" } ], "autoload": { "psr-4": { - "OCA\\NextcloudAppTemplate\\": "lib/" + "OCA\\Forum\\": "lib/" } }, "scripts": { - "post-install-cmd": [ - "@composer bin all install --ansi" - ], - "post-update-cmd": [ - "@composer bin all update --ansi" - ], "lint": "find . -name \\*.php -not -path './vendor/*' -not -path './vendor-bin/*' -not -path './gen/*' -not -path './build/*' -print0 | xargs -0 -n1 php -l", "cs:check": "php-cs-fixer fix --dry-run --diff", "cs:fix": "php-cs-fixer fix", @@ -29,11 +23,12 @@ "openapi": "generate-spec" }, "require": { - "bamarni/composer-bin-plugin": "^1.8", - "php": "^8.1" + "php": "^8.1", + "chriskonnertz/bbcode": "^1.1" }, "require-dev": { - "nextcloud/ocp": "dev-stable29", + "bamarni/composer-bin-plugin": "^1.8", + "nextcloud/ocp": "dev-stable32", "phpunit/phpunit": "^10.5", "roave/security-advisories": "dev-latest" }, @@ -46,5 +41,11 @@ "platform": { "php": "8.1" } + }, + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": true + } } }