Makefile and README

This commit is contained in:
Simon Vieille 2015-05-09 17:42:53 +02:00
parent 11cee3c399
commit 0dd59695cf
2 changed files with 39 additions and 24 deletions

View file

@ -1,11 +1,9 @@
COMPOSER ?= composer COMPOSER ?= composer
BOWER ?= bower BOWER ?= bower
GIT ?= git
MKDIR ?= mkdir
all: composer all: update
all: bower
prod: COMPOSER_INSTALL_FLAGS += --no-dev
prod: all optimize
composer: composer:
@echo @echo
@ -32,5 +30,18 @@ update:
# #
# Updating application's depencies. # Updating application's depencies.
# #
$(GIT) pull origin master
${MKDIR} -p data/git
$(COMPOSER) update $(COMPOSER) update
$(BOWER) install $(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

View file

@ -8,6 +8,7 @@ Requirements
* PHP >= 5.4 * PHP >= 5.4
* GIT * GIT
* MySQL, PostgreSQL or SQLite
* Composer (php) * Composer (php)
* Bower (node) * Bower (node)
@ -17,19 +18,23 @@ Installation
$ git clone https://gitlab.deblan.org/deblan/gist $ git clone https://gitlab.deblan.org/deblan/gist
$ cd gist $ cd gist
$ make $ 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.email "you@example.com"
$ git config --global user.name "Your Name" $ git config --global user.name "Your Name"
Composer ### Composer
--------
Composer can maybe be downloaded from your system's repositories. Composer can maybe be downloaded from your system's repositories.
Else, follow the next instructions: Else, follow the next instructions:
### Download #### Download
# With cURL # With cURL
curl -sS https://getcomposer.org/installer | php 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]`. You can now use it with `php composer.phar [arguments]`.
### Executable #### Executable
mv composer.phar composer mv composer.phar composer
chmod +x composer chmod +x composer
Use it with `./composer [arguments]`. Use it with `./composer [arguments]`.
### Install #### Install
Assuming `~/bin` exists ans is in `$PATH`. Assuming `~/bin` exists ans is in `$PATH`.
mv composer ~/bin mv composer ~/bin
### Dependencies Installation (from `composer.lock`) #### Dependencies Installation (from `composer.lock`)
composer install composer install
### Dependencies Update (will change `composer.lock`) #### Dependencies Update (will change `composer.lock`)
composer update composer update
Bower ### Bower
-----
### Install
#### Install
npm install -g bower npm install -g bower
### Dependencies Installation (from `bower.json`) #### D#ependencies Installation (from `bower.json`)
bower install bower install
### Dependencies Update (will change `bower.json`) #### De#pendencies Update
bower update bower inxtall
Makefile Makefile
@ -81,8 +86,7 @@ Makefile
A Makefile is provided to automate some tasks. A Makefile is provided to automate some tasks.
* `make` will install application's dependencies via Composer, * `make` will install application's dependencies via Composer and Bower,
* `make prod` will install dependencies without developmenent requirements
and run `make optimize`,
* `make optimize` will run Composer's autoloader dump script with classmap * `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