getversion.py 504 B

1234567891011121314151617
  1. #!/usr/bin/env python
  2. # This script parses the version number in dtool/PandaVersion.pp
  3. # and returns it on the command-line. This is useful for the
  4. # automated scripts that build the Panda3D releases.
  5. from makepandacore import ParsePandaVersion, ParsePluginVersion, GetMetadataValue
  6. import sys
  7. if '--runtime' in sys.argv:
  8. version = ParsePluginVersion("dtool/PandaVersion.pp")
  9. else:
  10. version = GetMetadataValue('version')
  11. version = version.strip()
  12. sys.stdout.write(version)
  13. sys.stdout.flush()