From 26490a8794e762a77bb0439790db641a222fb0ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Sun, 9 Oct 2016 21:15:57 +0200 Subject: Update Makefile --- Makefile | 37 ++++++++++++++----------------------- 1 file changed, 14 insertions(+), 23 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 9a469a93..a4a06e3f 100755 --- a/Makefile +++ b/Makefile @@ -7,31 +7,19 @@ SSH_PATH=/var/www/framabag.org/web ENV=prod -help: - @echo 'Makefile for wallabag ' - @echo ' ' - @echo 'Usage: ' - @echo ' make clean clear cache folder ' - @echo ' make install install latest stable wallabag version ' - @echo ' make update update to the latest stable wallabag version' - @echo ' make run run the wallabag server ' - @echo ' make build run grunt ' - @echo ' make test execute wallabag testsuite ' - @echo ' make release produce a wallabag release ' - @echo ' make travis make things for travis ' - @echo ' make deploy deploy wallabag ' - @echo ' ' +help: ## Display this help menu + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' -clean: +clean: ## Clear the application cache @rm -rf var/cache/* -install: +install: ## Install wallabag with the latest version TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) @git checkout $(TAG) @SYMFONY_ENV=$(ENV) composer install --no-dev -o --prefer-dist @php bin/console wallabag:install --env=$(ENV) -update: +update: ## Update the wallabag installation to the latest version @rm -rf var/cache/* @git fetch origin @git fetch --tags @@ -40,16 +28,19 @@ update: @SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist @php bin/console cache:clear --env=prod -run: +run: ## Run the wallabag server php bin/console server:run --env=$(ENV) -build: +build: ## Run grunt @grunt -test: +test: ## Launch wallabag testsuite @ant prepare && phpunit -v -release: +release: ## Create a package. Need a VERSION parameter (eg: `make release VERSION=master`). +ifndef VERSION + $(error VERSION is not set) +endif version=$(VERSION) @rm -rf $(TMP_FOLDER)/$(RELEASE_FOLDER) @mkdir $(TMP_FOLDER)/$(RELEASE_FOLDER) @@ -62,9 +53,9 @@ release: @scp $(TMP_FOLDER)/$(RELEASE_FOLDER)/wallabag-$(VERSION).tar.gz $(SSH_USER)@$(SSH_HOST):$(SSH_PATH) @rm -rf $(TMP_FOLDER)/$(RELEASE_FOLDER) -travis: +travis: ## Make some stuff for Travis-CI -deploy: +deploy: ## Deploy wallabag @bundle exec cap staging deploy .PHONY: help clean install update build test release travis deploy -- cgit v1.2.3