1
0

mkrelease.sh 926 B

123456789101112131415161718192021222324
  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. NAME="gamemode"
  7. VERSION=$(git describe --tags --dirty)
  8. # get code in this repo
  9. git archive HEAD --format=tar --prefix=${NAME}-${VERSION}/ --output=${NAME}-${VERSION}.tar
  10. # get code from subprojects
  11. meson subprojects download
  12. meson subprojects update --reset
  13. tar -rf ${NAME}-${VERSION}.tar --exclude-vcs --transform="s,^subprojects,${NAME}-$VERSION/subprojects," subprojects/inih-r54/
  14. # compress archive
  15. xz -9 "${NAME}-${VERSION}.tar"
  16. # Automatically sign the tarball with GPG key of user running this script
  17. gpg --armor --detach-sign "${NAME}-${VERSION}.tar.xz"
  18. gpg --verify "${NAME}-${VERSION}.tar.xz.asc"
  19. sha256sum "${NAME}-${VERSION}.tar.xz" "${NAME}-${VERSION}.tar.xz.asc" > sha256sums.txt