def get_release_from_binary(cls, binary): try: pex_info = PexInfo.from_pex(PythonDirectoryWrapper.get(binary)) return cls.get_release_from_tag( pex_info.build_properties.get('tag', '')) except PythonDirectoryWrapper.Error: return 'UNKNOWN'
def get_client_version(): try: pexpath = sys.argv[0] pex_info = PexInfo.from_pex(pexpath) return ("%s@%s" % (pex_info.build_properties.get("sha", "unknown"), pex_info.build_properties.get("date", "unknown"))) except (IOError, OSError): return "VersionUnknown"
def version(args): """usage: version Prints information about the version of the aurora client being run. """ try: pex_info = PexInfo.from_pex(sys.argv[0]) print("Aurora client build info:") print("\tsha: %s" % pex_info.build_properties['sha']) print("\tdate: %s" % pex_info.build_properties['date']) except (IOError, OSError): print("Aurora client build info not available") print("Aurora API version: %s" % CURRENT_API_VERSION)
def get_release_from_binary(cls, binary): try: pex_info = PexInfo.from_pex(PythonDirectoryWrapper.get(binary)) return cls.get_release_from_tag(pex_info.build_properties.get('tag', '')) except PythonDirectoryWrapper.Error: return 'UNKNOWN'
def get_release_from_binary(cls, binary): try: pex_info = PexInfo.from_pex(binary) return cls.get_release_from_tag(pex_info.build_properties.get('tag', '')) except (IOError, OSError): return 'UNKNOWN'