mkrelease.sh 959 B

12345678910111213141516171819202122232425
  1. #!/bin/bash
  2. set -e
  3. # Simple script to construct a redistributable and complete tarball of the
  4. # gamemode tree, including the subprojects, so that it can be trivially
  5. # packaged by distributions banning networking during build.
  6. # Bump in tandem with meson.build, run script once new tag is up.
  7. VERSION="1.6-dev"
  8. NAME="gamemode"
  9. # get code in this repo
  10. git archive HEAD --format=tar --prefix=${NAME}-${VERSION}/ --output=${NAME}-${VERSION}.tar
  11. # get code from subprojects
  12. meson subprojects download
  13. meson subprojects update
  14. tar -rf ${NAME}-${VERSION}.tar --exclude-vcs --transform="s,^subprojects,${NAME}-$VERSION/subprojects," subprojects/inih/
  15. # compress archive
  16. xz -9 "${NAME}-${VERSION}.tar"
  17. # Automatically sign the tarball with GPG key of user running this script
  18. gpg --armor --detach-sign "${NAME}-${VERSION}.tar.xz"
  19. gpg --verify "${NAME}-${VERSION}.tar.xz.asc"
  20. sha256sum "${NAME}-${VERSION}.tar.xz" "${NAME}-${VERSION}.tar.xz.asc" > sha256sums.txt