Created
August 9, 2020 20:49
-
-
Save clsource/90f860c3bb16286d1d4cc6e1ecb19db0 to your computer and use it in GitHub Desktop.
Example of Makefiles in Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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