Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example of Makefiles in Windows
root = true
[*]
end_of_line = lf
insert_final_newline = true
indent_size = 2
indent_style = space
[Makefile]
indent_style = tab
[*.bat]
end_of_line = crlf
@echo off
set CONTAINER=mycontainer
if /i "%1"=="install" goto install
if /i "%1"=="i" goto install
if /i "%1"=="stop" goto stop
if /i "%1"=="s" goto stop
goto install
:install
start /wait /B docker-compose up -d
start /wait /B docker exec %CONTAINER% composer install
start /wait /B docker exec %CONTAINER% npm install
goto :eof
:stop
start /wait /B docker-compose down -v
goto :eof
# http://users.csc.calpoly.edu/~gfisher/classes/309/lib/falcon-Makefiles/makefile-to-bat-file.html
# https://github.com/espositoandrea/Make-to-Batch/blob/master/make.bat
# https://superuser.com/a/717465
CONTAINER=mycontainer
i install:
docker-compose up -d
docker exec $(CONTAINER) composer install
docker exec $(CONTAINER) npm install
s stop:
docker-compose down -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment