checksums 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #!/bin/bash
  2. set -ex
  3. cd $(dirname $0)/..
  4. source ./scripts/version
  5. CHECKSUM="dist/checksums.txt"
  6. rm -f $CHECKSUM
  7. FILELIST="
  8. initrd
  9. rancheros.ipxe
  10. rancheros.iso
  11. rootfs.tar.gz
  12. vmlinuz
  13. rancheros-aliyun.vhd
  14. rancheros-cloudstack.img
  15. rancheros-digitalocean.img
  16. rancheros-openstack.img
  17. rancheros-gce.tar.gz
  18. rancheros-raspberry-pi64.zip
  19. rancheros-4glte.iso
  20. rancheros-hyperv.iso
  21. rancheros-proxmoxve.iso
  22. rancheros-proxmoxve-autoformat.iso
  23. rancheros-vmware.iso
  24. rancheros-vmware-autoformat.iso
  25. rancheros-vmware.vmdk
  26. "
  27. rm -rf dist/checksums && mkdir -p dist/checksums
  28. pushd dist/checksums
  29. for file in $FILELIST; do
  30. curl -sSL -o $file https://github.com/rancher/os/releases/download/$VERSION/$file
  31. for algo in sha256 md5; do
  32. echo "$algo: $(${algo}sum $file)" >> ../../$CHECKSUM
  33. done
  34. done
  35. popd
  36. echo "github-release upload --user rancher --repo os --tag ${VERSION} --file $CHECKSUM --name checksums.txt"
  37. echo "gsutil cp $CHECKSUM gs://releases.rancher.com/os/latest/checksums.txt"
  38. echo "gsutil cp $CHECKSUM gs://releases.rancher.com/os/$VERSION/checksums.txt"