Closed
Description
Currently Release.save()
has the following:
# Each micro release EOLs the previous one in the same series.
if self.status == "f" and self.micro > 0 and self.is_active:
(
type(self)
.objects.filter(
major=self.major, minor=self.minor, micro=self.micro - 1, status="f"
)
.update(eol_date=self.date)
)
This sets the previous final release as eol.
We should add handling for the following:
- The final feature release will make the previous release candidate eol
- Any further iterations of the release candidate sets the previous iteration as eol
- The release candidate sets the beta as eol and the beta sets the alpha as eol
Some untested messy logic below for an idea:
# Each micro release EOLs the previous one in the same series.
if self.status == "f" and self.micro > 0 and self.is_active:
(
type(self)
.objects.filter(
major=self.major, minor=self.minor, micro=self.micro - 1, status="f"
)
.update(eol_date=self.date)
)
elif self.status == "f" and self.micro == 0 and self.is_active:
(
type(self)
.objects.filter(
major=self.major,
minor=self.minor,
micro=self.micro,
status="rc",
eol_date__isnull=True,
)
.update(eol_date=self.date)
)
elif self.iteration > 1 and self.is_active:
(
type(self)
.objects.filter(
major=self.major,
minor=self.minor,
micro=self.micro,
status=self.status,
iteration=self.iteration - 1,
)
.update(eol_date=self.date)
)
elif self.status in ["b", "rc"] and self.is_active:
previous_status = {"b": "a", "rc": "b"}
(
type(self)
.objects.filter(
major=self.major,
minor=self.minor,
micro=self.micro,
status=previous_status[self.status],
eol_date__isnull=True,
)
.update(eol_date=self.date)
)
Metadata
Metadata
Assignees
Labels
No labels