Makefile 623 B

1234567891011121314151617181920212223242526272829303132
  1. project = barcodeserver
  2. all: build
  3. clean:
  4. rm barcodeserver-*
  5. barcodeserver-arm:
  6. CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7 go build -a -tags netgo -ldflags '-w' -o barcodeserver-arm
  7. barcodeserver-amd64:
  8. CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -tags netgo -ldflags '-w' -o barcodeserver-amd64
  9. amd64: barcodeserver-amd64
  10. arm: barcodeserver-arm
  11. docker: amd64
  12. cp barcodeserver-amd64 barcodeserver
  13. docker build -t diogok/$(project) .
  14. rm barcodeserver
  15. docker-arm: arm
  16. cp barcodeserver-arm barcodeserver
  17. docker build -t diogok/$(project):arm .
  18. rm barcodeserver
  19. push:
  20. docker push diogok/$(project)