diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-10-09 20:21:02 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-10-09 20:21:02 +0200 |
commit | d8507addbb2e222462f814718cb61d3eaf2c65e1 (patch) | |
tree | 7ebaba558d20a97ebb4b043e6fe66756aa857a54 /Makefile | |
parent | 5112b3556b5a85c791cac6ec89c19939e0677904 (diff) | |
download | wallabag-d8507addbb2e222462f814718cb61d3eaf2c65e1.tar.gz wallabag-d8507addbb2e222462f814718cb61d3eaf2c65e1.tar.zst wallabag-d8507addbb2e222462f814718cb61d3eaf2c65e1.zip |
First draft for Makefile
Diffstat (limited to 'Makefile')
-rwxr-xr-x | Makefile | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100755 index 00000000..0abd5c5d --- /dev/null +++ b/Makefile | |||
@@ -0,0 +1,47 @@ | |||
1 | TMP_FOLDER=/tmp | ||
2 | RELEASE_FOLDER=wllbg-release | ||
3 | |||
4 | SSH_USER=framasoft_bag | ||
5 | SSH_HOST=78.46.248.87 | ||
6 | SSH_PATH=/var/www/framabag.org/web | ||
7 | |||
8 | help: | ||
9 | @echo 'Makefile for wallabag ' | ||
10 | @echo ' ' | ||
11 | @echo 'Usage: ' | ||
12 | @echo ' make install install latest stable wallabag version ' | ||
13 | @echo ' make update update to the latest stable wallabag version' | ||
14 | @echo ' make build run grunt ' | ||
15 | @echo ' make test execute wallabag testsuite ' | ||
16 | @echo ' make release produce a wallabag release ' | ||
17 | @echo ' make travis make things for travis ' | ||
18 | @echo ' ' | ||
19 | |||
20 | install: | ||
21 | TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) | ||
22 | @git checkout $(TAG) | ||
23 | SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist | ||
24 | php bin/console wallabag:install --env=prod | ||
25 | |||
26 | update: | ||
27 | |||
28 | build: | ||
29 | grunt | ||
30 | |||
31 | test: | ||
32 | ant prepare && phpunit -v | ||
33 | |||
34 | release: | ||
35 | version=$(VERSION) | ||
36 | rm -rf $(TMP_FOLDER)/$(RELEASE_FOLDER) | ||
37 | mkdir $(TMP_FOLDER)/$(RELEASE_FOLDER) | ||
38 | @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 | ||
40 | cd $(TMP_FOLDER)/$(RELEASE_FOLDER)/$(VERSION) && php bin/console wallabag:install --env=prod | ||
41 | 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)" | ||
43 | @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) | ||
45 | rm -rf $(TMP_FOLDER)/$(RELEASE_FOLDER) | ||
46 | |||
47 | travis: | ||