build-templates.sh 659 B

123456789101112131415161718192021222324252627
  1. #!/bin/bash
  2. set -e
  3. if [ -z "$1" ] || [ -z "$2" ]; then
  4. echo "usage: $0 <version> <file version>"
  5. echo " like : $0 3.0.3.rc1 3.0.3-rc1"
  6. exit 1
  7. fi
  8. VERSION=$1
  9. FILE_VERSION=$2
  10. MONO_VERSION=$3
  11. echo "$VERSION" > templates/version.txt
  12. mkdir -p release-${FILE_VERSION}
  13. rm -f release-${FILE_VERSION}/*templates.tpz
  14. zip -q -9 -r -D release-${FILE_VERSION}/Godot_v${FILE_VERSION}_export_templates.tpz templates
  15. mkdir -p mono/release-${FILE_VERSION}
  16. rm -f mono/release-${FILE_VERSION}/*templates.tpz
  17. cd mono
  18. echo "$VERSION".mono > templates/version.txt
  19. zip -q -9 -r -D release-${FILE_VERSION}/Godot_v${FILE_VERSION}_mono_export_templates.tpz templates
  20. cd ..