diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-10-09 21:06:26 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-10-09 21:06:26 +0200 |
commit | 46aeaab8ff62f8db79412932e42626a274e7a87f (patch) | |
tree | bfa2fc8c9bcd4dff90bfba34d83eeba7afcbffae | |
parent | d8507addbb2e222462f814718cb61d3eaf2c65e1 (diff) | |
download | wallabag-46aeaab8ff62f8db79412932e42626a274e7a87f.tar.gz wallabag-46aeaab8ff62f8db79412932e42626a274e7a87f.tar.zst wallabag-46aeaab8ff62f8db79412932e42626a274e7a87f.zip |
Update Makefile
-rwxr-xr-x | Makefile | 45 |
1 files changed, 34 insertions, 11 deletions
@@ -5,43 +5,66 @@ SSH_USER=framasoft_bag | |||
5 | SSH_HOST=78.46.248.87 | 5 | SSH_HOST=78.46.248.87 |
6 | SSH_PATH=/var/www/framabag.org/web | 6 | SSH_PATH=/var/www/framabag.org/web |
7 | 7 | ||
8 | ENV=prod | ||
9 | |||
8 | help: | 10 | help: |
9 | @echo 'Makefile for wallabag ' | 11 | @echo 'Makefile for wallabag ' |
10 | @echo ' ' | 12 | @echo ' ' |
11 | @echo 'Usage: ' | 13 | @echo 'Usage: ' |
14 | @echo ' make clean clear cache folder ' | ||
12 | @echo ' make install install latest stable wallabag version ' | 15 | @echo ' make install install latest stable wallabag version ' |
13 | @echo ' make update update to the latest stable wallabag version' | 16 | @echo ' make update update to the latest stable wallabag version' |
17 | @echo ' make run run the wallabag server ' | ||
14 | @echo ' make build run grunt ' | 18 | @echo ' make build run grunt ' |
15 | @echo ' make test execute wallabag testsuite ' | 19 | @echo ' make test execute wallabag testsuite ' |
16 | @echo ' make release produce a wallabag release ' | 20 | @echo ' make release produce a wallabag release ' |
17 | @echo ' make travis make things for travis ' | 21 | @echo ' make travis make things for travis ' |
22 | @echo ' make deploy deploy wallabag ' | ||
18 | @echo ' ' | 23 | @echo ' ' |
19 | 24 | ||
25 | clean: | ||
26 | @rm -rf var/cache/* | ||
27 | |||
20 | install: | 28 | install: |
21 | TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) | 29 | TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) |
22 | @git checkout $(TAG) | 30 | @git checkout $(TAG) |
23 | SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist | 31 | @SYMFONY_ENV=$(ENV) composer install --no-dev -o --prefer-dist |
24 | php bin/console wallabag:install --env=prod | 32 | @php bin/console wallabag:install --env=$(ENV) |
25 | 33 | ||
26 | update: | 34 | update: |
35 | @rm -rf var/cache/* | ||
36 | @git fetch origin | ||
37 | @git fetch --tags | ||
38 | TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) | ||
39 | @git checkout $(TAG) | ||
40 | @SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist | ||
41 | @php bin/console cache:clear --env=prod | ||
42 | |||
43 | run: | ||
44 | php bin/console server:run --env=$(ENV) | ||
27 | 45 | ||
28 | build: | 46 | build: |
29 | grunt | 47 | @grunt |
30 | 48 | ||
31 | test: | 49 | test: |
32 | ant prepare && phpunit -v | 50 | @ant prepare && phpunit -v |
33 | 51 | ||
34 | release: | 52 | release: |
35 | version=$(VERSION) | 53 | version=$(VERSION) |
36 | rm -rf $(TMP_FOLDER)/$(RELEASE_FOLDER) | 54 | @rm -rf $(TMP_FOLDER)/$(RELEASE_FOLDER) |
37 | mkdir $(TMP_FOLDER)/$(RELEASE_FOLDER) | 55 | @mkdir $(TMP_FOLDER)/$(RELEASE_FOLDER) |
38 | @git clone git@github.com:wallabag/wallabag.git -b $(VERSION) $(TMP_FOLDER)/$(RELEASE_FOLDER)/$(VERSION) | 56 | @git clone git@github.com:wallabag/wallabag.git -b $(VERSION) $(TMP_FOLDER)/$(RELEASE_FOLDER)/$(VERSION) |
39 | cd $(TMP_FOLDER)/$(RELEASE_FOLDER)/$(VERSION) && SYMFONY_ENV=prod composer up -n --no-dev | 57 | @cd $(TMP_FOLDER)/$(RELEASE_FOLDER)/$(VERSION) && SYMFONY_ENV=$(ENV) composer up -n --no-dev |
40 | cd $(TMP_FOLDER)/$(RELEASE_FOLDER)/$(VERSION) && php bin/console wallabag:install --env=prod | 58 | @cd $(TMP_FOLDER)/$(RELEASE_FOLDER)/$(VERSION) && php bin/console wallabag:install --env=$(ENV) |
41 | cd $(TMP_FOLDER)/$(RELEASE_FOLDER) && tar czf wallabag-$(VERSION).tar.gz --exclude="var/cache/*" --exclude="var/logs/*" --exclude="var/sessions/*" --exclude=".git" $(VERSION) | 59 | @cd $(TMP_FOLDER)/$(RELEASE_FOLDER) && tar czf wallabag-$(VERSION).tar.gz --exclude="var/cache/*" --exclude="var/logs/*" --exclude="var/sessions/*" --exclude=".git" $(VERSION) |
42 | @echo "MD5 checksum of the package for wallabag $(VERSION)" | 60 | @echo "MD5 checksum of the package for wallabag $(VERSION)" |
43 | @md5 $(TMP_FOLDER)/$(RELEASE_FOLDER)/wallabag-$(VERSION).tar.gz | 61 | @md5 $(TMP_FOLDER)/$(RELEASE_FOLDER)/wallabag-$(VERSION).tar.gz |
44 | scp $(TMP_FOLDER)/$(RELEASE_FOLDER)/wallabag-$(VERSION).tar.gz $(SSH_USER)@$(SSH_HOST):$(SSH_PATH) | 62 | @scp $(TMP_FOLDER)/$(RELEASE_FOLDER)/wallabag-$(VERSION).tar.gz $(SSH_USER)@$(SSH_HOST):$(SSH_PATH) |
45 | rm -rf $(TMP_FOLDER)/$(RELEASE_FOLDER) | 63 | @rm -rf $(TMP_FOLDER)/$(RELEASE_FOLDER) |
46 | 64 | ||
47 | travis: | 65 | travis: |
66 | |||
67 | deploy: | ||
68 | @bundle exec cap staging deploy | ||
69 | |||
70 | .PHONY: help clean install update build test release travis deploy | ||