diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-10-09 21:15:57 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-10-09 21:15:57 +0200 |
commit | 26490a8794e762a77bb0439790db641a222fb0ef (patch) | |
tree | 25bc50b219114262131ddbca5ecf63c95a3c3190 /Makefile | |
parent | 46aeaab8ff62f8db79412932e42626a274e7a87f (diff) | |
download | wallabag-26490a8794e762a77bb0439790db641a222fb0ef.tar.gz wallabag-26490a8794e762a77bb0439790db641a222fb0ef.tar.zst wallabag-26490a8794e762a77bb0439790db641a222fb0ef.zip |
Update Makefile
Diffstat (limited to 'Makefile')
-rwxr-xr-x | Makefile | 37 |
1 files changed, 14 insertions, 23 deletions
@@ -7,31 +7,19 @@ SSH_PATH=/var/www/framabag.org/web | |||
7 | 7 | ||
8 | ENV=prod | 8 | ENV=prod |
9 | 9 | ||
10 | help: | 10 | help: ## Display this help menu |
11 | @echo 'Makefile for wallabag ' | 11 | @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' |
12 | @echo ' ' | ||
13 | @echo 'Usage: ' | ||
14 | @echo ' make clean clear cache folder ' | ||
15 | @echo ' make install install latest stable wallabag version ' | ||
16 | @echo ' make update update to the latest stable wallabag version' | ||
17 | @echo ' make run run the wallabag server ' | ||
18 | @echo ' make build run grunt ' | ||
19 | @echo ' make test execute wallabag testsuite ' | ||
20 | @echo ' make release produce a wallabag release ' | ||
21 | @echo ' make travis make things for travis ' | ||
22 | @echo ' make deploy deploy wallabag ' | ||
23 | @echo ' ' | ||
24 | 12 | ||
25 | clean: | 13 | clean: ## Clear the application cache |
26 | @rm -rf var/cache/* | 14 | @rm -rf var/cache/* |
27 | 15 | ||
28 | install: | 16 | install: ## Install wallabag with the latest version |
29 | TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) | 17 | TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) |
30 | @git checkout $(TAG) | 18 | @git checkout $(TAG) |
31 | @SYMFONY_ENV=$(ENV) composer install --no-dev -o --prefer-dist | 19 | @SYMFONY_ENV=$(ENV) composer install --no-dev -o --prefer-dist |
32 | @php bin/console wallabag:install --env=$(ENV) | 20 | @php bin/console wallabag:install --env=$(ENV) |
33 | 21 | ||
34 | update: | 22 | update: ## Update the wallabag installation to the latest version |
35 | @rm -rf var/cache/* | 23 | @rm -rf var/cache/* |
36 | @git fetch origin | 24 | @git fetch origin |
37 | @git fetch --tags | 25 | @git fetch --tags |
@@ -40,16 +28,19 @@ update: | |||
40 | @SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist | 28 | @SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist |
41 | @php bin/console cache:clear --env=prod | 29 | @php bin/console cache:clear --env=prod |
42 | 30 | ||
43 | run: | 31 | run: ## Run the wallabag server |
44 | php bin/console server:run --env=$(ENV) | 32 | php bin/console server:run --env=$(ENV) |
45 | 33 | ||
46 | build: | 34 | build: ## Run grunt |
47 | @grunt | 35 | @grunt |
48 | 36 | ||
49 | test: | 37 | test: ## Launch wallabag testsuite |
50 | @ant prepare && phpunit -v | 38 | @ant prepare && phpunit -v |
51 | 39 | ||
52 | release: | 40 | release: ## Create a package. Need a VERSION parameter (eg: `make release VERSION=master`). |
41 | ifndef VERSION | ||
42 | $(error VERSION is not set) | ||
43 | endif | ||
53 | version=$(VERSION) | 44 | version=$(VERSION) |
54 | @rm -rf $(TMP_FOLDER)/$(RELEASE_FOLDER) | 45 | @rm -rf $(TMP_FOLDER)/$(RELEASE_FOLDER) |
55 | @mkdir $(TMP_FOLDER)/$(RELEASE_FOLDER) | 46 | @mkdir $(TMP_FOLDER)/$(RELEASE_FOLDER) |
@@ -62,9 +53,9 @@ release: | |||
62 | @scp $(TMP_FOLDER)/$(RELEASE_FOLDER)/wallabag-$(VERSION).tar.gz $(SSH_USER)@$(SSH_HOST):$(SSH_PATH) | 53 | @scp $(TMP_FOLDER)/$(RELEASE_FOLDER)/wallabag-$(VERSION).tar.gz $(SSH_USER)@$(SSH_HOST):$(SSH_PATH) |
63 | @rm -rf $(TMP_FOLDER)/$(RELEASE_FOLDER) | 54 | @rm -rf $(TMP_FOLDER)/$(RELEASE_FOLDER) |
64 | 55 | ||
65 | travis: | 56 | travis: ## Make some stuff for Travis-CI |
66 | 57 | ||
67 | deploy: | 58 | deploy: ## Deploy wallabag |
68 | @bundle exec cap staging deploy | 59 | @bundle exec cap staging deploy |
69 | 60 | ||
70 | .PHONY: help clean install update build test release travis deploy | 61 | .PHONY: help clean install update build test release travis deploy |