-
Notifications
You must be signed in to change notification settings - Fork 444
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: expose integer Tutor version parts to templates (#1060)
We expose the TUTOR_MAJOR_VERSION and TUTOR_MINOR_VERSION template variables, parsed from TUTOR_VERSION. This is convenient for maintainers of plugins which target multiple Tutor/Open edX versions. We do not expose TUTOR_VERSION_PATCH because (1) plugins shouldn't really need to look at the PATCH version and (2) we don't want to prevent Tutor from ever using non-integer patch suffixes (like alpha, beta, rc, etc.) if there were ever a need for that.
- Loading branch information
1 parent
b662e9e
commit d547f5b
Showing
3 changed files
with
9 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- [Feature] Add integer variables `TUTOR_VERSION_MAJOR` and `TUTOR_VERSION_MINOR` to the template context. These are parsed from the existing `TUTOR_VERSION` string variable, which takes the format `"MAJOR.MINOR.PATCH"`. We add them as a convenience to developers who need to maintain version-agnostic Tutor plugins (by @michaelwheeler and @kdmccormick). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters