Skip to content

Commit

Permalink
Add phony targets to Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
groldan committed Oct 8, 2024
1 parent ec2a3c8 commit 08eab97
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.PHONY: all
all: install test build-image

TAG=$(shell mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
Expand All @@ -9,44 +10,54 @@ COMPOSE_ACCEPTANCE_DATADIR_OPTIONS ?= $(COMPOSE_DATADIR_OPTIONS) -f acceptance.y
UID=$(shell id -u)
GID=$(shell id -g)

.PHONY: clean
clean:
./mvnw clean

.PHONY: lint
lint:
./mvnw fmt:check sortpom:verify -Dsort.verifyFailOn=strict -Dsort.verifyFail=stop -ntp

.PHONY: format
format:
./mvnw sortpom:sort fmt:format -ntp

.PHONY: install
install:
./mvnw clean install -DskipTests -ntp -T4 -U

.PHONY: test
test:
./mvnw verify -ntp -T4

.PHONY: build-base-images
build-base-images:
./mvnw clean package -f src/apps/base-images -DskipTests -T4 && \
COMPOSE_DOCKER_CLI_BUILD=1 \
DOCKER_BUILDKIT=1 \
TAG=$(TAG) \
docker compose -f docker-build/base-images.yml build

.PHONY: build-image-infrastructure
build-image-infrastructure:
./mvnw clean package -f src/apps/infrastructure -DskipTests -T4 && \
COMPOSE_DOCKER_CLI_BUILD=1 \
DOCKER_BUILDKIT=1 \
TAG=$(TAG) \
docker compose -f docker-build/infrastructure.yml build

.PHONY: build-image-geoserver
build-image-geoserver:
./mvnw clean package -f src/apps/geoserver -DskipTests -T4 && \
COMPOSE_DOCKER_CLI_BUILD=1 \
DOCKER_BUILDKIT=1 \
TAG=$(TAG) \
docker compose -f docker-build/geoserver.yml build


.PHONY: build-image
build-image: build-base-images build-image-infrastructure build-image-geoserver

.PHONY: push-image
push-image:
TAG=$(TAG) \
docker compose \
Expand Down

0 comments on commit 08eab97

Please sign in to comment.