108 lines
1.9 KiB
Makefile
108 lines
1.9 KiB
Makefile
|
|
### build and sign release
|
|
|
|
app_name=notes
|
|
project_dir=$(CURDIR)/../$(app_name)
|
|
build_dir=$(CURDIR)/build/artifacts
|
|
sign_dir=$(build_dir)/sign
|
|
appstore_dir=$(build_dir)/appstore
|
|
package_name=$(app_name)
|
|
cert_dir=$(HOME)/.nextcloud/certificates
|
|
|
|
appstore: clean
|
|
mkdir -p $(sign_dir)
|
|
rsync -a \
|
|
--exclude=.git \
|
|
--exclude=build \
|
|
--exclude=.gitignore \
|
|
--exclude=.travis.yml \
|
|
--exclude=.scrutinizer.yml \
|
|
--exclude=CONTRIBUTING.md \
|
|
--exclude=composer.json \
|
|
--exclude=composer.lock \
|
|
--exclude=composer.phar \
|
|
--exclude=.tx \
|
|
--exclude=l10n/no-php \
|
|
--exclude=Makefile \
|
|
--exclude=nbproject \
|
|
--exclude=screenshots \
|
|
--exclude=phpunit*xml \
|
|
--exclude=tests \
|
|
--exclude=vendor/bin \
|
|
--exclude=js/node_modules \
|
|
--exclude=js/tests \
|
|
--exclude=js/karma.conf.js \
|
|
--exclude=js/gulpfile.js \
|
|
--exclude=js/bower.json \
|
|
--exclude=js/package.json \
|
|
$(project_dir) $(sign_dir)
|
|
@echo "Signing…"
|
|
php ../server/occ integrity:sign-app \
|
|
--privateKey=$(cert_dir)/$(app_name).key\
|
|
--certificate=$(cert_dir)/$(app_name).crt\
|
|
--path=$(sign_dir)/$(app_name)
|
|
tar -czf $(build_dir)/$(app_name).tar.gz \
|
|
-C $(sign_dir) $(app_name)
|
|
openssl dgst -sha512 -sign $(cert_dir)/$(app_name).key $(build_dir)/$(app_name).tar.gz | openssl base64
|
|
|
|
|
|
### from vueexample
|
|
|
|
all: dev-setup lint build-js-production test
|
|
|
|
# Dev env management
|
|
dev-setup: clean clean-dev npm-init
|
|
|
|
npm-init:
|
|
npm install
|
|
|
|
npm-upgrade:
|
|
npm-upgrade
|
|
npm install
|
|
|
|
npm-update:
|
|
npm update
|
|
|
|
# Building
|
|
build-js:
|
|
npm run dev
|
|
|
|
build-js-production:
|
|
npm run build
|
|
|
|
watch-js:
|
|
npm run watch
|
|
|
|
# Testing
|
|
test:
|
|
npm run test
|
|
|
|
test-watch:
|
|
npm run test:watch
|
|
|
|
test-coverage:
|
|
npm run test:coverage
|
|
|
|
# Linting
|
|
lint:
|
|
npm run lint
|
|
|
|
lint-fix:
|
|
npm run lint:fix
|
|
|
|
# Style linting
|
|
stylelint:
|
|
npm run stylelint
|
|
|
|
stylelint-fix:
|
|
npm run stylelint:fix
|
|
|
|
# Cleaning
|
|
clean:
|
|
rm -f js/notes.js
|
|
rm -f js/notes.js.map
|
|
|
|
clean-dev:
|
|
rm -rf node_modules
|
|
|