From 0dd59695cfe962d78eb744073339e2ff38fc278c Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Sat, 9 May 2015 17:42:53 +0200 Subject: [PATCH] Makefile and README --- Makefile | 21 ++++++++++++++++----- README.md | 42 +++++++++++++++++++++++------------------- 2 files changed, 39 insertions(+), 24 deletions(-) diff --git a/Makefile b/Makefile index 17ddded..3a43bea 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,9 @@ COMPOSER ?= composer BOWER ?= bower +GIT ?= git +MKDIR ?= mkdir -all: composer -all: bower - -prod: COMPOSER_INSTALL_FLAGS += --no-dev -prod: all optimize +all: update composer: @echo @@ -32,5 +30,18 @@ update: # # Updating application's depencies. # + $(GIT) pull origin master + ${MKDIR} -p data/git $(COMPOSER) update $(BOWER) install + +propel: + @echo + # + # Propel migration. + # + ./vendor/propel/propel/bin/propel config:convert + ./vendor/propel/propel/bin/propel model:build --recursive + ./vendor/propel/propel/bin/propel migration:diff --recursive + ./vendor/propel/propel/bin/propel migration:migrate --recursive + ./vendor/propel/propel/bin/propel model:build --recursive diff --git a/README.md b/README.md index 67fb3f4..ad9d62f 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ Requirements * PHP >= 5.4 * GIT +* MySQL, PostgreSQL or SQLite * Composer (php) * Bower (node) @@ -17,19 +18,23 @@ Installation $ git clone https://gitlab.deblan.org/deblan/gist $ cd gist $ make + $ mv propel-dist.yaml propel.yaml + $ # EDIT propel.yml (dsn) + $ make propel + +### Git + +Git can maybe be downloaded from your system's repositories. -Git ---- $ git config --global user.email "you@example.com" $ git config --global user.name "Your Name" -Composer --------- +### Composer Composer can maybe be downloaded from your system's repositories. Else, follow the next instructions: -### Download +#### Download # With cURL curl -sS https://getcomposer.org/installer | php @@ -39,41 +44,41 @@ Else, follow the next instructions: You can now use it with `php composer.phar [arguments]`. -### Executable +#### Executable mv composer.phar composer chmod +x composer Use it with `./composer [arguments]`. -### Install +#### Install Assuming `~/bin` exists ans is in `$PATH`. mv composer ~/bin -### Dependencies Installation (from `composer.lock`) +#### Dependencies Installation (from `composer.lock`) composer install -### Dependencies Update (will change `composer.lock`) +#### Dependencies Update (will change `composer.lock`) composer update -Bower ------ +### Bower -### Install + +#### Install npm install -g bower -### Dependencies Installation (from `bower.json`) +#### D#ependencies Installation (from `bower.json`) bower install -### Dependencies Update (will change `bower.json`) +#### De#pendencies Update - bower update + bower inxtall Makefile @@ -81,8 +86,7 @@ Makefile A Makefile is provided to automate some tasks. -* `make` will install application's dependencies via Composer, -* `make prod` will install dependencies without developmenent requirements - and run `make optimize`, +* `make` will install application's dependencies via Composer and Bower, * `make optimize` will run Composer's autoloader dump script with classmap - only, without dynamic autoload rules, +* `make update` will update the application +* `make propel` will generate propel's files