The plugin's version at the base ref, or None if it didn't exist there.
(base: str, plugin_json: Path)
| 97 | |
| 98 | |
| 99 | def base_version(base: str, plugin_json: Path) -> str | None: |
| 100 | """The plugin's version at the base ref, or None if it didn't exist there.""" |
| 101 | raw = git_ok("show", f"{base}:{rel(plugin_json)}") |
| 102 | if raw is None: |
| 103 | return None |
| 104 | try: |
| 105 | return json.loads(raw).get("version") |
| 106 | except json.JSONDecodeError: |
| 107 | return None |
| 108 | |
| 109 | |
| 110 | def working_version(plugin_json: Path) -> str | None: |