aboutsummaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2016-10-09 21:06:26 +0200
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2016-10-09 21:06:26 +0200
commit46aeaab8ff62f8db79412932e42626a274e7a87f (patch)
treebfa2fc8c9bcd4dff90bfba34d83eeba7afcbffae /Makefile
parentd8507addbb2e222462f814718cb61d3eaf2c65e1 (diff)
downloadwallabag-46aeaab8ff62f8db79412932e42626a274e7a87f.tar.gz
wallabag-46aeaab8ff62f8db79412932e42626a274e7a87f.tar.zst
wallabag-46aeaab8ff62f8db79412932e42626a274e7a87f.zip
Update Makefile
Diffstat (limited to 'Makefile')
-rwxr-xr-xMakefile45
1 files changed, 34 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index 0abd5c5d..9a469a93 100755
--- a/Makefile
+++ b/Makefile
@@ -5,43 +5,66 @@ SSH_USER=framasoft_bag
5SSH_HOST=78.46.248.87 5SSH_HOST=78.46.248.87
6SSH_PATH=/var/www/framabag.org/web 6SSH_PATH=/var/www/framabag.org/web
7 7
8ENV=prod
9
8help: 10help:
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
25clean:
26 @rm -rf var/cache/*
27
20install: 28install:
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
26update: 34update:
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
43run:
44 php bin/console server:run --env=$(ENV)
27 45
28build: 46build:
29 grunt 47 @grunt
30 48
31test: 49test:
32 ant prepare && phpunit -v 50 @ant prepare && phpunit -v
33 51
34release: 52release:
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
47travis: 65travis:
66
67deploy:
68 @bundle exec cap staging deploy
69
70.PHONY: help clean install update build test release travis deploy