The previous version had a number of errors, including:
Not setting LTS at 4 years past a major version.
Incorrectly setting LTS for the previous minor version as 2 years after the minor version release (vs. 2 years past the next major release)
Setting LTS on the previous minor of a skeleton, vs previous major.
You can read more about them in #103.
This patch fixes the logic so that the following statements are true:
For skeletons:
We generate an Active package using the current release, ALWAYS.
If the previous major release was more than 4 years ago, we generate no additional packages.
Otherwise, we generate an LTS package using the previous major version, with the expriation set to 4 years after the release date.
If no previous minor release relative to the previous major release exists, or if today is more than 2 years after the previous major release, we generate no additional packages.
Otherwise, we generate an LTS package using the previous minor release relative to the previous major release, with the expiration set to 2 years past the major release date.
For other packages:
We generate an ACTIVE package using the current release, ALWAYS.
For each skeleton LTS version that marks the package as a dependency:
We generate an LTS package using the skeleton name and LTS support date.
If the previous major release was 1.0.0, we do not generate additional packages.
If the previous major release was more than 1 year ago, we do not generate additional packages.
Otherwise, we generate a SECURITY package using the previous minor release version, and the date of the major release + 1 year.
Additionally, I've added a special case for the ZendSkeletonApplication: when 3.0 is the most recent major version, we do not generate additional LTS packages (as previous LTS was 2.4).
To make this possible, I also introduced a new command, lts:fetch-tag-data; this fetches the raw tag data and dumps it to STDOUT as a PHP file, allowing you to redirect STDOUT to a filename. This allowed me to test without needing to pull data via the GitHub API constantly.
The previous version had a number of errors, including:
You can read more about them in #103.
This patch fixes the logic so that the following statements are true:
For skeletons:
For other packages:
Additionally, I've added a special case for the ZendSkeletonApplication: when 3.0 is the most recent major version, we do not generate additional LTS packages (as previous LTS was 2.4).
To make this possible, I also introduced a new command,
lts:fetch-tag-data
; this fetches the raw tag data and dumps it to STDOUT as a PHP file, allowing you to redirect STDOUT to a filename. This allowed me to test without needing to pull data via the GitHub API constantly.Fixes #103.