Skip to content

Commit

Permalink
Closes #18559: Add a build parameter to ReleaseInfo (#18560)
Browse files Browse the repository at this point in the history
* Closes #18559: Add a build parameter to ReleaseInfo

* Adjust dataclass typing
  • Loading branch information
jeremystretch authored Feb 3, 2025
1 parent 0b794de commit f829f34
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions netbox/utilities/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,17 @@ class ReleaseInfo:
edition: str
published: Union[datetime.date, None] = None
designation: Union[str, None] = None
build: Union[str, None] = None
features: FeatureSet = field(default_factory=FeatureSet)

@property
def full_version(self):
output = self.version
if self.designation:
return f"{self.version}-{self.designation}"
return self.version
output = f"{output}-{self.designation}"
if self.build:
output = f"{output}-{self.build}"
return output

@property
def name(self):
Expand Down

0 comments on commit f829f34

Please sign in to comment.