From d8507addbb2e222462f814718cb61d3eaf2c65e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Sun, 9 Oct 2016 20:21:02 +0200 Subject: [PATCH] First draft for Makefile --- Makefile | 47 +++++++++++++++++++++++++++++++++++++++++++++++ install.sh | 6 ------ 2 files changed, 47 insertions(+), 6 deletions(-) create mode 100755 Makefile delete mode 100755 install.sh diff --git a/Makefile b/Makefile new file mode 100755 index 000000000..0abd5c5d5 --- /dev/null +++ b/Makefile @@ -0,0 +1,47 @@ +TMP_FOLDER=/tmp +RELEASE_FOLDER=wllbg-release + +SSH_USER=framasoft_bag +SSH_HOST=78.46.248.87 +SSH_PATH=/var/www/framabag.org/web + +help: + @echo 'Makefile for wallabag ' + @echo ' ' + @echo 'Usage: ' + @echo ' make install install latest stable wallabag version ' + @echo ' make update update to the latest stable wallabag version' + @echo ' make build run grunt ' + @echo ' make test execute wallabag testsuite ' + @echo ' make release produce a wallabag release ' + @echo ' make travis make things for travis ' + @echo ' ' + +install: + 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 wallabag:install --env=prod + +update: + +build: + grunt + +test: + ant prepare && phpunit -v + +release: + version=$(VERSION) + rm -rf $(TMP_FOLDER)/$(RELEASE_FOLDER) + mkdir $(TMP_FOLDER)/$(RELEASE_FOLDER) + @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) && php bin/console wallabag:install --env=prod + 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)" + @md5 $(TMP_FOLDER)/$(RELEASE_FOLDER)/wallabag-$(VERSION).tar.gz + scp $(TMP_FOLDER)/$(RELEASE_FOLDER)/wallabag-$(VERSION).tar.gz $(SSH_USER)@$(SSH_HOST):$(SSH_PATH) + rm -rf $(TMP_FOLDER)/$(RELEASE_FOLDER) + +travis: diff --git a/install.sh b/install.sh deleted file mode 100755 index 901b34463..000000000 --- a/install.sh +++ /dev/null @@ -1,6 +0,0 @@ -#! /usr/bin/env bash - -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 wallabag:install --env=prod