Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Make task runners great again
Search
GBProd
June 12, 2017
Programming
340
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Make task runners great again
GBProd
June 12, 2017
More Decks by GBProd
See All by GBProd
Les tests en Symfony
gbprod
0
240
Gilles, craftman from father to son
gbprod
0
190
SOLID/STUPID
gbprod
0
370
DDD: Retour d'expérience
gbprod
0
53
Artisan développeur
gbprod
0
79
Other Decks in Programming
See All in Programming
AIの中の人になってみる
htkym
0
150
ALB ログから Trace を気合で繋げる技術
fohte
7
840
typoなんかねぇよ
raspython3
0
640
tsc.rip を支える技術 / Kyoto.なんか #8
susisu
0
4.1k
Loosening the Reins: Go Generics Get More Flexible
kuro_kurorrr
0
360
Webエンジニアなのにブラウザの仕組みがわからないので、Pythonで自作してみた
tatsuki12
4
1.6k
Gmail/Google DriveをトリガーにAIエージェントを動かそう! / Run AI agents with Gmail/Google Drive as triggers!
har1101
3
460
関東Kaggler会_NVIDIA_Nemotron_コンペ_振り返り
rick_ds
0
780
LLMは4年分のCompose移行を再現できるのか?実プロダクト279件のXMLで探る自動化の境界線
makun
0
250
Claude Codeを組織的に動かして月400PRを実現した話
happy_ryo
0
230
Go 1.27 における memory allocation の高速化
andpad
0
370
[PyCon KR 2026] More Variants, More Diversity for AI Accelerators
achimnol
0
130
Featured
See All Featured
The World Runs on Bad Software
bkeepers
PRO
72
12k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.8k
We Are The Robots
honzajavorek
0
330
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
410
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
850
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
290
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Writing Fast Ruby
sferik
630
63k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
400
The Language of Interfaces
destraynor
162
27k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Transcript
MAKE TASK RUNNER GREAT AGAIN @GillesRoustan
BASH PHING COMPOSER ROBO BLDR GRUMPHP NPM GULP GRUNT... @GillesRoustan
None
MAKE ONE TOOL TO RULE THEM ALL @GillesRoustan
INDEPENDANT
HOW-TO ? @GillesRoustan
# Makefile target:[prerequisites] [recipe]
# Makefile target:[prerequisites] \t [recipe]
$ make target
MAKE IS NOT A TASK RUNNER
file.o: file.c gcc file.c -o file.o
.PHONY: install install: file.o file.o: file.c gcc file.c -o file.o
$ make install gcc file.c -o file.o ...
$ make install Rien à faire pour la règle ...
MAKE ME UP, BEFORE YOU GO GO @GillesRoustan
vendor: composer.lock composer install composer.lock: composer.json composer update
.PHONY: install install: vendor [...]
$ make install composer install ...
$ make --always-make install composer update ...
.PHONY: install update update: $(MAKE) --always-make install install: vendor
MAKE CONFIGURATION @GillesRoustan
ENV = dev
ENV ?= dev
ENV ?= dev vendor: composer.lock ifeq ($(ENV), prod) composer install
--no-dev --optimize-autoloader else composer install endif
$ make install composer install ...
$ make install ENV=prod composer install --no-dev --optimize-autoloader ...
GREATER ? @GillesRoustan
ENV ?= dev COMPOSER_ARGS ?= ifeq ($(ENV), prod) COMPOSER_ARGS= --no-dev
--optimize-autoloader endif vendor: composer.lock composer install $(COMPOSER_ARGS)
INCLUDE EH MAKE, ELLE EST OÙ MA CAISSE ? @GillesRoustan
include *.mk
include .env
https://github.com/symfony/dotenv
.env: @if [ ! -e .env ]; then \ cp
env.dist .env; \ fi include .env
MAKE CONTINOUS INTEGRATION GREAT AGAIN @GillesRoustan
test-unit: install vendor/bin/phpunit $(PHPUNIT_ARGS)
# .travis.yml sudo: required services: - docker script: - make
test-unit
MAKE IT WITH DOCKER @GillesRoustan
test-unit: install docker exec -it my-container vendor/bin/phpunit
EXEC=docker exec -it my-container test-unit: install $(EXEC) vendor/bin/phpunit
MAKE FUNCTIONS ? @GillesRoustan
test-unit: install $(call execute, vendor/bin/phpunit) define execute docker exec -it
my-container $(1) @echo $(1) >> make.log endef
DOCKER EST UN ENVIRONNEMENT
# .env ENV=dev DOCKER=true
ifeq ($(DOCKER), true) define execute docker exec -it my-container $(1)
endef else define execute $(1) endef endif
clean: $(call execute, \ chmod -R 0777 var && \
rm -Rf var/cache/prod && \ rm -Rf var/cache/dev \ )
MAKE MONO-REPOSITORY @GillesRoustan
.PHONY: install install: $(MAKE) --directory=app-php install
.PHONY: install install: $(MAKE) -directory=app-php install $(MAKE) -directory=app-js install $(MAKE)
-C app-ologies install $(MAKE) -C app-artement install $(MAKE) -C app-toum install $(MAKE) -C app-app-app install
.PHONY: install install: $(MAKE) -directory=app-php install $(MAKE) -directory=app-js install $(MAKE)
-C app-ologies install $(MAKE) -C app-artement install $(MAKE) -C app-toum install $(MAKE) -C app-app-app install
MAKE MONO-REPOSITORY EASY ! @GillesRoustan
DIRS:=$(dir $(wildcard */)) .PHONY: install $(DIRS) install: $(DIRS) test-unit: $(DIRS)
$(DIRS): $(MAKE) --directory=$@ $(MAKECMDGOALS)
MAKE I HELP YOU ? @GillesRoustan
help: ## This help @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(TARGETS) |
sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
help: ## This help @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(TARGETS) |
sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' https://marmelab.com/blog/2016/02/29/au to-documented-makefile.html
$ make help install Install app undate Update app test-unit
Unit test app minify Minify js/css serve Run server ...
ADOPTE UN MAKE
https://github.com/gbprod/conf-makefile
THANK YOU QUESTIONS ?