justfile 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. version := `../tools/image-tag`
  2. commit := `git rev-parse --short HEAD`
  3. thirdPartyLicenseFile := "THIRD_PARTY_LICENSES.txt"
  4. default:
  5. just --list
  6. build-local:
  7. npm install
  8. npx parcel build src/index.html
  9. build IMAGETAG: build-local
  10. cp ../{{thirdPartyLicenseFile}} .
  11. docker buildx build \
  12. --rm \
  13. --platform "linux/amd64" \
  14. -f 'Dockerfile.cross' \
  15. --provenance=false \
  16. -t {{IMAGETAG}}-amd64 \
  17. --build-arg version={{version}} \
  18. --build-arg commit={{commit}} \
  19. --push \
  20. .
  21. docker buildx build \
  22. --rm \
  23. --platform "linux/arm64" \
  24. -f 'Dockerfile.cross' \
  25. --provenance=false \
  26. -t {{IMAGETAG}}-arm64 \
  27. --build-arg version={{version}} \
  28. --build-arg commit={{commit}} \
  29. --push \
  30. .
  31. manifest-tool push from-args \
  32. --platforms "linux/amd64,linux/arm64" \
  33. --template {{IMAGETAG}}-ARCH \
  34. --target {{IMAGETAG}}
  35. rm -f {{thirdPartyLicenseFile}}