()
| 270 | |
| 271 | |
| 272 | def get_fastdeploy_version(): |
| 273 | import pkg_resources |
| 274 | |
| 275 | version = os.environ.get("FASTDEPLOY_VERSION") |
| 276 | if version: |
| 277 | return version |
| 278 | |
| 279 | try: |
| 280 | return pkg_resources.get_distribution("fastdeploy").version |
| 281 | except: |
| 282 | pass |
| 283 | |
| 284 | try: |
| 285 | result = subprocess.run(["pip", "show", "fastdeploy"], capture_output=True, text=True) |
| 286 | if result.returncode == 0: |
| 287 | for line in result.stdout.split("\n"): |
| 288 | if line.startswith("Version:"): |
| 289 | return line.split(":")[1].strip() |
| 290 | except: |
| 291 | pass |
| 292 | |
| 293 | return "unknown (could not determine version)" |
| 294 | |
| 295 | |
| 296 | def summarize_fastdeploy_build_flags(): |
no test coverage detected