Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REFACTOR] [CONFIG] [DOCKER] docker-compose calls replaced by new "do… #216

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ BRUTEFORCE ?= false
## (3) (4)
BRUTEFORCE :=$(shell echo '${BRUTEFORCE}'| tr '[:lower:]' '[:upper:]'| tr -d '[:blank:]')

# DOCKER
DOCKER_COMPOSE=docker compose

ifeq ($(BRUTEFORCE),1)
add_bruteforce=-tags bruteforce
endif
Expand Down Expand Up @@ -111,34 +114,34 @@ build: env dependencies
$(GO) build -v -o bin/ ./...

compose/build: env
docker-compose --profile lint build
docker-compose --profile testing build
docker-compose --profile production build
${DOCKER_COMPOSE} --profile lint build
${DOCKER_COMPOSE} --profile testing build
${DOCKER_COMPOSE} --profile production build

compose/rebuild: env
docker-compose --profile lint build --no-cache
docker-compose --profile testing build --no-cache
docker-compose --profile production build
${DOCKER_COMPOSE} --profile lint build --no-cache
${DOCKER_COMPOSE} --profile testing build --no-cache
${DOCKER_COMPOSE} --profile production build

compose/lint/markdown: compose/build
docker-compose --profile lint run --rm algorithm-exercises-go-lint make lint/markdown
${DOCKER_COMPOSE} --profile lint run --rm algorithm-exercises-go-lint make lint/markdown

compose/lint/yaml: compose/build
docker-compose --profile lint run --rm algorithm-exercises-go-lint make lint/yaml
${DOCKER_COMPOSE} --profile lint run --rm algorithm-exercises-go-lint make lint/yaml

compose/test/styling: compose/build
docker-compose --profile lint run --rm algorithm-exercises-go-lint make test/styling
${DOCKER_COMPOSE} --profile lint run --rm algorithm-exercises-go-lint make test/styling

compose/test/static: compose/build
docker-compose --profile lint run --rm algorithm-exercises-go-lint make test/static
${DOCKER_COMPOSE} --profile lint run --rm algorithm-exercises-go-lint make test/static

compose/lint: compose/lint/markdown compose/lint/yaml compose/test/styling compose/test/static

compose/test: compose/build
docker-compose --profile testing run --rm algorithm-exercises-go-test make test
${DOCKER_COMPOSE} --profile testing run --rm algorithm-exercises-go-test make test

compose/run: compose/build
docker-compose --profile production run --rm algorithm-exercises-go
${DOCKER_COMPOSE} --profile production run --rm algorithm-exercises-go

all: test coverage

Expand Down
Loading