build.sh 428 B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. set -e
  3. # https://laravel.com/docs/master/releases
  4. if [ "$#" -ne 1 ]; then
  5. echo "USAGE: $0 PHP_VERSION"
  6. exit 1
  7. fi
  8. export VERSION=$(date "+%4Y%m%d%H%M%S")
  9. export CODE="mint-php$1-$(uname -m)"
  10. export TAR="$CODE-$VERSION"
  11. podman pull ubuntu:latest
  12. podman build --build-arg PHP_VERSION=$1 -t $CODE .
  13. podman save --format=oci-archive -o $TAR.tar $CODE
  14. md5sum $TAR.tar >$TAR.md5
  15. echo "done($TAR.tar)."
  16. exit 0