2
0

04_release_hash.sh 475 B

12345678910111213
  1. #!/bin/bash
  2. if [ $# != "1" ]
  3. then
  4. echo "Usage: ./utils/releasetools/04_release_hash.sh <version_tag>"
  5. exit 1
  6. fi
  7. SHA=$(curl -s http://download.redis.io/releases/redis-${1}.tar.gz | shasum -a 256 | cut -f 1 -d' ')
  8. ENTRY="hash redis-${1}.tar.gz sha256 $SHA http://download.redis.io/releases/redis-${1}.tar.gz"
  9. echo $ENTRY >> ../redis-hashes/README
  10. echo "Press any key to commit, Ctrl-C to abort)."
  11. read yes
  12. (cd ../redis-hashes; git commit -a -m "${1} hash."; git push)