From 7627c57ae8d8b87f599d570c118f7a4c765168a2 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Sat, 8 Nov 2014 10:27:18 +0100 Subject: try to migrate to oc7 --- Makefile | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..f8b04656 --- /dev/null +++ b/Makefile @@ -0,0 +1,104 @@ +# +# ownCloud scaffolder tool +# +# Copyright (C) 2013 Bernhard Posselt, +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +# Makefile for building the project +app_name=notes +project_dir=$(CURDIR)/../../$(app_name) +build_dir=$(CURDIR)/artifacts +appstore_dir=$(build_dir)/appstore +package_name=$(app_name) + +# binary directories for running the CI tests +firefox_bin=/usr/bin/firefox +chrome_bin=/usr/bin/chromium +phantomjs_bin=/usr/bin/phantomjs + +# common directories +grunt_dir=$(CURDIR)/node_modules/grunt-cli/bin/grunt +bower_dir=$(CURDIR)/node_modules/bower/bin/bower +gruntfile_dir=$(CURDIR)/Gruntfile.js + +js_dir=$(CURDIR)/../js +js_public_dir=$(js_dir)/public + +php_unit_tests_dir=$(CURDIR)/../tests/php/unit +php_integration_tests_dir=$(CURDIR)/../tests/php/integration +php_acceptance_tests_dir=$(CURDIR)/../tests/php/acceptance + + + +# building the javascript +all: build + +build: deps + mkdir -p $(js_public_dir) + $(grunt_dir) --config $(gruntfile_dir) build + +watch: build + $(grunt_dir) --config $(gruntfile_dir) watch:concat + +update: deps + $(bower_dir) update + +# testing +tests: js-unit-tests php-unit-tests php-integration-tests php-acceptance-tests + +unit-tests: js-unit-tests php-unit-tests + + +# testing js +js-unit-tests: deps + export PHANTOMJS_BIN=$(phantomjs_bin) && \ + $(grunt_dir) --config $(gruntfile_dir) karma:continuous + +watch-js-unit-tests: deps + export CHROME_BIN=$(chrome_bin) && export FIREFOX_BIN=$(firefox_bin) && \ + $(grunt_dir) --config $(gruntfile_dir) karma:unit + + +# testing php +php-unit-tests: deps + phpunit $(php_unit_tests_dir) + +watch-php-unit-tests: deps + $(grunt_dir) --config $(gruntfile_dir) watch:phpunit + +php-integration-tests: deps + phpunit $(php_integration_tests_dir) + +php-acceptance-tests: deps + cd $(php_acceptance_tests_dir); make headless + + +# general +deps: + npm install --deps + +clean: + rm -rf $(CURDIR)/node_modules + rm -rf $(build_dir) + +dist: appstore + +appstore: clean + mkdir -p $(appstore_dir) + tar cvzf $(appstore_dir)/$(package_name).tar.gz $(project_dir) \ + --exclude-vcs --exclude=$(project_dir)/build/artifacts #\ + # --exclude=$(project_dir)/tests \ + #--exclude=$(project_dir)/.travis.yml \ No newline at end of file -- cgit v1.2.3