Add make docker-bash helper (#123)

This commit is contained in:
Adrian Macneil 2020-03-15 08:58:05 -07:00 committed by GitHub
parent 882c821c1d
commit f7a3390299
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 4 deletions

View file

@ -45,7 +45,12 @@ build-windows:
GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc-posix CXX=x86_64-w64-mingw32-g++-posix \ GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc-posix CXX=x86_64-w64-mingw32-g++-posix \
go build $(LDFLAGS) -o dist/dbmate-windows-amd64.exe . go build $(LDFLAGS) -o dist/dbmate-windows-amd64.exe .
.PHONY: docker .PHONY: docker-all
docker: docker-all:
docker-compose build
docker-compose run --rm dbmate make
.PHONY: docker-bash
docker-bash:
docker-compose build docker-compose build
docker-compose run --rm dbmate make docker-compose run --rm dbmate make

View file

@ -353,11 +353,11 @@ Dbmate is written in Go, pull requests are welcome.
Tests are run against a real database using docker-compose. To build a docker image and run the tests: Tests are run against a real database using docker-compose. To build a docker image and run the tests:
```sh ```sh
$ make docker $ make docker-all
``` ```
To start a development shell: To start a development shell:
```sh ```sh
$ docker-compose run --rm dbmate bash $ make docker-bash
``` ```