Commit 98f65036ea39ed86b863b6bcd350d800de5d88d6

Authored by Carlos Vieira
1 parent 09a12ece
Exists in master

Garantindo limpeza com o trap

Showing 1 changed file with 5 additions and 5 deletions   Show diff stats
makefile
... ... @@ -21,11 +21,11 @@ testReport:
21 21 npm run testReport
22 22  
23 23 teste:
24   - docker build docker -t barra-govbr-image
25   - docker run -dit -p 80:80 --name barra-govbr barra-govbr-image
26   -# TODO usar trap para EXIT
27   - npm run test || (docker rm -f barra-govbr && docker rmi -f barra-govbr-image)
28   - docker rm -f barra-govbr && docker rmi -f barra-govbr-image
  24 + trap 'docker rm -f barra-govbr && docker rmi -f barra-govbr-image' EXIT && \
  25 + docker build docker -t barra-govbr-image && \
  26 + docker run -dit -p 80:80 --name barra-govbr barra-govbr-image && \
  27 + npm run test
  28 +
29 29  
30 30  
31 31  
... ...