Browse Source

override PackageModel.get_tag()

shut-new-model
Niklas Rosenstein 9 months ago
parent
commit
ecd3f54b49
No known key found for this signature in database GPG Key ID: 6D269B33D25F6C6
1 changed files with 6 additions and 0 deletions
  1. + 6
    - 0
      src/shut/model/package.py

+ 6
- 0
src/shut/model/package.py

@ -188,6 +188,12 @@ class PackageModel(AbstractProjectModel):
def get_version(self) -> Optional[Version]:
return self.data.version
def get_tag(self, version: Version) -> str:
tag_format = self.release.tag_format
if self.project and self.project.monorepo and '{name}' not in tag_format:
tag_format = '{name}@' + tag_format
return tag_format.format(name=self.data.name, version=version)
class PythonPackageMetadata:
"""

Loading…
Cancel
Save