diff options
author | splitt3r <splitt3r@users.noreply.github.com> | 2017-10-21 16:18:45 +0300 |
---|---|---|
committer | splitt3r <splitt3r@users.noreply.github.com> | 2017-10-21 16:18:45 +0300 |
commit | 70571747b0390d228080547157db20f985332793 (patch) | |
tree | 41a649af816ebd63da43c12007b20bc1a0ac58db /Makefile | |
parent | 540e09bcade129f22e2682041dcf4e704385ee79 (diff) |
Added make cmd for ownCloud marketplace
Builds SASS files to CSS
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 40 |
1 files changed, 38 insertions, 2 deletions
@@ -12,6 +12,7 @@ # * curl: used if phpunit and composer are not installed to fetch them from the web # * tar: for building the archive # * npm: for building and testing everything JS +# * sass: for building css files for ownCloud # # If no composer.json is in the app root directory, the Composer step # will be skipped. The same goes for the package.json which can be located in @@ -47,6 +48,7 @@ appstore_build_directory=$(CURDIR)/build/artifacts/appstore appstore_package_name=$(appstore_build_directory)/$(app_name) npm=$(shell which npm 2> /dev/null) composer=$(shell which composer 2> /dev/null) +sass=$(shell which sass 2> /dev/null) all: build @@ -69,7 +71,7 @@ endif # a copy is fetched from the web .PHONY: composer composer: -ifeq (, $(composer)) +ifeq (,$(composer)) @echo "No composer command available, downloading a copy from the web" mkdir -p $(build_tools_directory) curl -sS https://getcomposer.org/installer | php @@ -121,7 +123,7 @@ source: --exclude="../$(app_name)/js/node_modules" \ --exclude="../$(app_name)/node_modules" \ --exclude="../$(app_name)/*.log" \ - --exclude="../$(app_name)/js/*.log" \ + --exclude="../$(app_name)/js/*.log" # Builds the source package for the app store, ignores php and js tests .PHONY: appstore @@ -149,7 +151,41 @@ appstore: --exclude="../$(app_name)/karma.*" \ --exclude="../$(app_name)/protractor\.*" \ --exclude="../$(app_name)/.*" \ + --exclude="../$(app_name)/js/.*" + +# Builds the source package for the marketplace, ignores php and js tests +.PHONY: marketplace +marketplace: +ifeq (,$(sass)) + @echo "No sass command available, please install it and rerun" +else + sass --update css:css + rm -rf $(appstore_build_directory) + mkdir -p $(appstore_build_directory) + tar cvzf $(appstore_package_name).tar.gz ../$(app_name) \ + --exclude-vcs \ + --exclude="../$(app_name)/build" \ + --exclude="../$(app_name)/tests" \ + --exclude="../$(app_name)/Makefile" \ + --exclude="../$(app_name)/*.log" \ + --exclude="../$(app_name)/phpunit*xml" \ + --exclude="../$(app_name)/composer.*" \ + --exclude="../$(app_name)/js/node_modules" \ + --exclude="../$(app_name)/js/tests" \ + --exclude="../$(app_name)/js/test" \ + --exclude="../$(app_name)/js/*.log" \ + --exclude="../$(app_name)/js/package.json" \ + --exclude="../$(app_name)/js/bower.json" \ + --exclude="../$(app_name)/js/karma.*" \ + --exclude="../$(app_name)/js/protractor.*" \ + --exclude="../$(app_name)/package.json" \ + --exclude="../$(app_name)/bower.json" \ + --exclude="../$(app_name)/karma.*" \ + --exclude="../$(app_name)/protractor\.*" \ + --exclude="../$(app_name)/.*" \ --exclude="../$(app_name)/js/.*" \ + --exclude="../$(app_name)/css/*.scss" +endif .PHONY: test test: composer |