mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-25 18:41:05 +00:00
Update Makefile
This commit is contained in:
parent
d8507addbb
commit
46aeaab8ff
1 changed files with 34 additions and 11 deletions
45
Makefile
45
Makefile
|
@ -5,43 +5,66 @@ SSH_USER=framasoft_bag
|
||||||
SSH_HOST=78.46.248.87
|
SSH_HOST=78.46.248.87
|
||||||
SSH_PATH=/var/www/framabag.org/web
|
SSH_PATH=/var/www/framabag.org/web
|
||||||
|
|
||||||
|
ENV=prod
|
||||||
|
|
||||||
help:
|
help:
|
||||||
@echo 'Makefile for wallabag '
|
@echo 'Makefile for wallabag '
|
||||||
@echo ' '
|
@echo ' '
|
||||||
@echo 'Usage: '
|
@echo 'Usage: '
|
||||||
|
@echo ' make clean clear cache folder '
|
||||||
@echo ' make install install latest stable wallabag version '
|
@echo ' make install install latest stable wallabag version '
|
||||||
@echo ' make update update to the latest stable wallabag version'
|
@echo ' make update update to the latest stable wallabag version'
|
||||||
|
@echo ' make run run the wallabag server '
|
||||||
@echo ' make build run grunt '
|
@echo ' make build run grunt '
|
||||||
@echo ' make test execute wallabag testsuite '
|
@echo ' make test execute wallabag testsuite '
|
||||||
@echo ' make release produce a wallabag release '
|
@echo ' make release produce a wallabag release '
|
||||||
@echo ' make travis make things for travis '
|
@echo ' make travis make things for travis '
|
||||||
|
@echo ' make deploy deploy wallabag '
|
||||||
@echo ' '
|
@echo ' '
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@rm -rf var/cache/*
|
||||||
|
|
||||||
install:
|
install:
|
||||||
TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
|
TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
|
||||||
@git checkout $(TAG)
|
@git checkout $(TAG)
|
||||||
SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist
|
@SYMFONY_ENV=$(ENV) composer install --no-dev -o --prefer-dist
|
||||||
php bin/console wallabag:install --env=prod
|
@php bin/console wallabag:install --env=$(ENV)
|
||||||
|
|
||||||
update:
|
update:
|
||||||
|
@rm -rf var/cache/*
|
||||||
|
@git fetch origin
|
||||||
|
@git fetch --tags
|
||||||
|
TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
|
||||||
|
@git checkout $(TAG)
|
||||||
|
@SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist
|
||||||
|
@php bin/console cache:clear --env=prod
|
||||||
|
|
||||||
|
run:
|
||||||
|
php bin/console server:run --env=$(ENV)
|
||||||
|
|
||||||
build:
|
build:
|
||||||
grunt
|
@grunt
|
||||||
|
|
||||||
test:
|
test:
|
||||||
ant prepare && phpunit -v
|
@ant prepare && phpunit -v
|
||||||
|
|
||||||
release:
|
release:
|
||||||
version=$(VERSION)
|
version=$(VERSION)
|
||||||
rm -rf $(TMP_FOLDER)/$(RELEASE_FOLDER)
|
@rm -rf $(TMP_FOLDER)/$(RELEASE_FOLDER)
|
||||||
mkdir $(TMP_FOLDER)/$(RELEASE_FOLDER)
|
@mkdir $(TMP_FOLDER)/$(RELEASE_FOLDER)
|
||||||
@git clone git@github.com:wallabag/wallabag.git -b $(VERSION) $(TMP_FOLDER)/$(RELEASE_FOLDER)/$(VERSION)
|
@git clone git@github.com:wallabag/wallabag.git -b $(VERSION) $(TMP_FOLDER)/$(RELEASE_FOLDER)/$(VERSION)
|
||||||
cd $(TMP_FOLDER)/$(RELEASE_FOLDER)/$(VERSION) && SYMFONY_ENV=prod composer up -n --no-dev
|
@cd $(TMP_FOLDER)/$(RELEASE_FOLDER)/$(VERSION) && SYMFONY_ENV=$(ENV) composer up -n --no-dev
|
||||||
cd $(TMP_FOLDER)/$(RELEASE_FOLDER)/$(VERSION) && php bin/console wallabag:install --env=prod
|
@cd $(TMP_FOLDER)/$(RELEASE_FOLDER)/$(VERSION) && php bin/console wallabag:install --env=$(ENV)
|
||||||
cd $(TMP_FOLDER)/$(RELEASE_FOLDER) && tar czf wallabag-$(VERSION).tar.gz --exclude="var/cache/*" --exclude="var/logs/*" --exclude="var/sessions/*" --exclude=".git" $(VERSION)
|
@cd $(TMP_FOLDER)/$(RELEASE_FOLDER) && tar czf wallabag-$(VERSION).tar.gz --exclude="var/cache/*" --exclude="var/logs/*" --exclude="var/sessions/*" --exclude=".git" $(VERSION)
|
||||||
@echo "MD5 checksum of the package for wallabag $(VERSION)"
|
@echo "MD5 checksum of the package for wallabag $(VERSION)"
|
||||||
@md5 $(TMP_FOLDER)/$(RELEASE_FOLDER)/wallabag-$(VERSION).tar.gz
|
@md5 $(TMP_FOLDER)/$(RELEASE_FOLDER)/wallabag-$(VERSION).tar.gz
|
||||||
scp $(TMP_FOLDER)/$(RELEASE_FOLDER)/wallabag-$(VERSION).tar.gz $(SSH_USER)@$(SSH_HOST):$(SSH_PATH)
|
@scp $(TMP_FOLDER)/$(RELEASE_FOLDER)/wallabag-$(VERSION).tar.gz $(SSH_USER)@$(SSH_HOST):$(SSH_PATH)
|
||||||
rm -rf $(TMP_FOLDER)/$(RELEASE_FOLDER)
|
@rm -rf $(TMP_FOLDER)/$(RELEASE_FOLDER)
|
||||||
|
|
||||||
travis:
|
travis:
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
@bundle exec cap staging deploy
|
||||||
|
|
||||||
|
.PHONY: help clean install update build test release travis deploy
|
||||||
|
|
Loading…
Reference in a new issue