]>
Commit | Line | Data |
---|---|---|
d8507add NL |
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 | ||
46aeaab8 NL |
8 | ENV=prod |
9 | ||
26490a87 NL |
10 | help: ## Display this help menu |
11 | @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | |
d8507add | 12 | |
26490a87 | 13 | clean: ## Clear the application cache |
46aeaab8 NL |
14 | @rm -rf var/cache/* |
15 | ||
26490a87 | 16 | install: ## Install wallabag with the latest version |
d8507add NL |
17 | TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) |
18 | @git checkout $(TAG) | |
46aeaab8 NL |
19 | @SYMFONY_ENV=$(ENV) composer install --no-dev -o --prefer-dist |
20 | @php bin/console wallabag:install --env=$(ENV) | |
d8507add | 21 | |
26490a87 | 22 | update: ## Update the wallabag installation to the latest version |
46aeaab8 NL |
23 | @rm -rf var/cache/* |
24 | @git fetch origin | |
25 | @git fetch --tags | |
26 | TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) | |
27 | @git checkout $(TAG) | |
28 | @SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist | |
29 | @php bin/console cache:clear --env=prod | |
30 | ||
26490a87 | 31 | run: ## Run the wallabag server |
46aeaab8 | 32 | php bin/console server:run --env=$(ENV) |
d8507add | 33 | |
26490a87 | 34 | build: ## Run grunt |
46aeaab8 | 35 | @grunt |
d8507add | 36 | |
26490a87 | 37 | test: ## Launch wallabag testsuite |
46aeaab8 | 38 | @ant prepare && phpunit -v |
d8507add | 39 | |
26490a87 NL |
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 | |
d8507add | 44 | version=$(VERSION) |
46aeaab8 NL |
45 | @rm -rf $(TMP_FOLDER)/$(RELEASE_FOLDER) |
46 | @mkdir $(TMP_FOLDER)/$(RELEASE_FOLDER) | |
d8507add | 47 | @git clone git@github.com:wallabag/wallabag.git -b $(VERSION) $(TMP_FOLDER)/$(RELEASE_FOLDER)/$(VERSION) |
46aeaab8 NL |
48 | @cd $(TMP_FOLDER)/$(RELEASE_FOLDER)/$(VERSION) && SYMFONY_ENV=$(ENV) composer up -n --no-dev |
49 | @cd $(TMP_FOLDER)/$(RELEASE_FOLDER)/$(VERSION) && php bin/console wallabag:install --env=$(ENV) | |
50 | @cd $(TMP_FOLDER)/$(RELEASE_FOLDER) && tar czf wallabag-$(VERSION).tar.gz --exclude="var/cache/*" --exclude="var/logs/*" --exclude="var/sessions/*" --exclude=".git" $(VERSION) | |
d8507add NL |
51 | @echo "MD5 checksum of the package for wallabag $(VERSION)" |
52 | @md5 $(TMP_FOLDER)/$(RELEASE_FOLDER)/wallabag-$(VERSION).tar.gz | |
46aeaab8 NL |
53 | @scp $(TMP_FOLDER)/$(RELEASE_FOLDER)/wallabag-$(VERSION).tar.gz $(SSH_USER)@$(SSH_HOST):$(SSH_PATH) |
54 | @rm -rf $(TMP_FOLDER)/$(RELEASE_FOLDER) | |
d8507add | 55 | |
26490a87 | 56 | travis: ## Make some stuff for Travis-CI |
46aeaab8 | 57 | |
26490a87 | 58 | deploy: ## Deploy wallabag |
46aeaab8 NL |
59 | @bundle exec cap staging deploy |
60 | ||
61 | .PHONY: help clean install update build test release travis deploy |