Skip to content

Commit

Permalink
Merge pull request #37 from cingaldi/feature/improve_build_process
Browse files Browse the repository at this point in the history
added dev-run and dev-stop goals to do one command build and run for …
  • Loading branch information
slyfer authored Apr 25, 2020
2 parents f8bab6d + f83c10b commit d72586d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ all1: clean updateproject swagger la la2 la3
no: clean updateproject swagger la la2
docker-build: updateproject docker

help:
@awk 'BEGIN {FS = ":.*##"; printf " \nnoiapp-backend\n\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)


dev-run: docker-build ## Builds and runs containerized server in dev configuration
docker run --rm -d -p 80:8080 -e JAVA_OPTS="-Dspring.profiles.active=dev" --name=dev_noiapp noiapp/noiapp-backend:develop

dev-stop: ## stops the dev server
docker stop dev_noiapp

updateproject:
mvn -f dpppt-backend-sdk/pom.xml clean package
#cp dpppt-backend-sdk/dpppt-backend-sdk-ws/generated/swagger/swagger.yaml documentation/yaml/sdk.yaml
Expand All @@ -33,6 +43,7 @@ show:

docker:
cp dpppt-backend-sdk/dpppt-backend-sdk-ws/target/dpppt-backend-sdk-ws-1.0.0-SNAPSHOT.jar ws-sdk/ws/bin/dpppt-backend-sdk-ws-1.0.0.jar
mkdir -p ws-sdk/ws/conf
rm -f ws-sdk/ws/conf/*
cp dpppt-backend-sdk/dpppt-backend-sdk-ws/src/main/resources/logback.xml ws-sdk/ws/conf/dpppt-backend-sdk-ws-logback.xml
cp dpppt-backend-sdk/dpppt-backend-sdk-ws/src/main/resources/*.properties ws-sdk/ws/conf
Expand Down

0 comments on commit d72586d

Please sign in to comment.