Browse Source

feat(release notes): Add release notes model

merge-requests/13/head
James 1 year ago
parent
commit
51a65b57e6
  1. 3
      CHANGELOG
  2. 12
      README.md
  3. 126
      data/pre_releases.json
  4. 1638
      data/releases.json
  5. 5
      lang/supportedversions_en.php
  6. 5
      lang/supportedversions_fr.php
  7. 1
      modeles/supportedversions_pre_releases.html
  8. 37
      modeles/supportedversions_release_notes.html
  9. 1
      pre_releases.json.html

3
CHANGELOG

@ -13,6 +13,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `<supportedversions|compatibility`> model
- releases upgrades (SPIP3.2.11)
- SPIP4.x release announcement
- `<supportedversions|release_notes`> model
- `<supportedversions|pre_releases`> model
- `pre_releases.json` page
## [0.3.0] - 2020-10-12

12
README.md

@ -15,12 +15,16 @@ SPIP Plugin backport of [PHP Supported Versions](http://php.net/supported-versio
- `<supportedversions|latest>`: list of the latest releases of active branches
- `<supportedversions|eol>`: list of the end of life branches
- `<supportedversions|compatibility>`: table matrix of SPIP/PHP Compatibility
- `<supportedversions|release_notes>`: list of releases by date
- `<supportedversions|pre_releases>` : list of pre-releases in JSON
## Other usage
Calling `/spip.php?page=supported-versions.svg` renders a calendar in svg format.
Calling `/spip.php?spip.php?page=releases.json` renders a JSON formatted of releases.
Calling `/spip.php?page=releases.json` renders a JSON formatted of releases.
Calling `/spip.php?page=pre_releases.json` renders a JSON formatted of alpha, beta and RC pre-releases.
## .htaccess
@ -36,6 +40,12 @@ RewriteRule ^releases\.json$ spip.php?page=releases.json [QSA,L]
and call : `/releases.json`
```apache
RewriteRule ^pre_releases\.json$ spip.php?page=pre_releases.json [QSA,L]
```
and call : `/pre_releases.json`
## Thanks
- Hanjo for the Dutch translation

126
data/pre_releases.json

@ -0,0 +1,126 @@
[
{
"branch": "3.0",
"pre_releases": [
{
"version": "3.0.0-alpha1",
"released_at": "2011-07-03 17:16:05"
},{
"version": "3.0.0-beta",
"released_at": "2011-09-23 09:29:13",
"announce": [{
"lang": "fr",
"url": "https://blog.spip.net/SPIP-1-9-2k-2-0-16-2-1-11-et-3-0-0-beta-disponibles.html"
}],
"download": [{
"url": "http://files.spip.org/spip/dev/SPIP-3-beta.zip"
}]
},{
"version": "3.0.0-beta2",
"released_at": "2012-01-03 11:46:17"
},{
"version": "3.0.0-RC",
"released_at": "2012-04-07 22:06:31"
}
]
},{
"branch": "3.1",
"pre_releases": [
{
"version": "3.1.0-alpha",
"released_at": "2014-11-09 17:10:17"
},{
"version": "3.1.0-beta",
"released_at": "2015-06-21 14:42:07",
"announce": [{
"lang": "fr",
"url": "https://blog.spip.net/SPIP-joue-a-cache-cache-avec-OpCache.html"
}],
"download": [{
"url": "http://files.spip.org/spip/archives/SPIP-vtrois.1.0-beta.zip"
}]
},{
"version": "v3.1.0-RC",
"released_at": "2015-10-31 21:52:41"
},{
"version": "3.1.0-RC2",
"released_at": "2015-12-03 21:57:44"
},{
"version": "3.1.0-RC3",
"released_at": "2017-03-22 22:33:33",
"announce": [{
"lang": "fr",
"url": "https://blog.spip.net/SPIP-3-1-Release-Candidate-3-Mise-a-jour-de-securite.html"
}],
"download": [{
"url": "http://files.spip.net/spip/archives/SPIP-vtrois.1.0-rc3.zip"
}]
}
]
},{
"branch": "3.2",
"pre_releases": [
{
"version": "3.2.0-alpha1",
"released_at": "2017-03-22 22:50:42",
"announce": [
{
"lang": "fr",
"url": "https://blog.spip.net/Chouette-SPIP-3-2-alpha.html"
}
],
"changelog": "https://contrib.spip.net/SPIP-3-2-alpha-changelogg",
"download": [{
"url" : "https://files.spip.net/spip/archives/SPIP-vtrois.2.0-alpha-1.zip"
}]
},{
"version": "3.2.0-beta",
"released_at": "2017-05-06 01:59:03"
},{
"version": "3.2.0-beta2",
"released_at": "2017-06-09 06:51:10",
"announce": [
{
"lang": "fr",
"url": "https://blog.spip.net/Mise-a-jour-de-maintenance-Sortie-de-SPIP-3-1-5-SPIP-3-0-26-et-SPIP-3-2-beta.html"
}
],
"download": [
{
"url": "https://files.spip.net/spip/archives/SPIP-vtrois.2.0-beta-2.zip"
}
]
},{
"version": "3.2.0-beta3",
"released_at": "2017-06-12 08:57:24",
"announce": [
{
"lang": "fr",
"url": "https://blog.spip.net/Mise-a-jour-CRITIQUE-de-securite-Sortie-de-SPIP-3-1-6-et-SPIP-3-2-Beta-3.html"
}
],
"download": [
{
"url": "https://files.spip.net/spip/archives/SPIP-vtrois.2.0-beta-3.zip"
}
]
}
]
},{
"branch": "4.0",
"pre_releases": [
{
"version": "4.0.0-alpha",
"released_at": "2021-05-01",
"announce": [{
"lang": "fr",
"url": "https://blog.spip.net/O-mega-c-est-SPIP-4-0-alpha.html"
}],
"download": {
"url": "https://files.spip.net/spip/dev/spip-v4.0.0-alpha.zip",
"size": 10077659
}
}
]
}
]

1638
data/releases.json

File diff suppressed because it is too large Load Diff

5
lang/supportedversions_en.php

@ -22,4 +22,9 @@ $GLOBALS[$GLOBALS['idx_lang']] = [
'latest_releases' => 'Latest releases',
'current_page' => 'current version',
'eol_page' => 'A table of end of life branches is available.',
'released_at' => 'Released',
'announcement' => 'Announcement',
'changelog' => 'Changelog',
'download' => 'Download',
'download_size' => 'Size',
];

5
lang/supportedversions_fr.php

@ -25,4 +25,9 @@ $GLOBALS[$GLOBALS['idx_lang']] = [
'latest_releases' => 'Derni&egrave;res versions',
'current_page' => 'version maintenue',
'eol_page' => 'Un tableau de la fin de vie des branches est disponible.',
'released_at' => 'Publi&eacute;e le',
'announcement' => 'Annonce',
'changelog' => 'Changelog',
'download' => 'T&eacute;l&eacute;chargement',
'download_size' => 'Taille',
];

1
modeles/supportedversions_pre_releases.html

@ -0,0 +1 @@
[(#CHEMIN{'data/pre_releases.json'}|file_get_contents)]

37
modeles/supportedversions_release_notes.html

@ -0,0 +1,37 @@
#SET{releases, #ARRAY{}}
<BOUCLE_release_notes(DATA){source json, #CHEMIN{'data/releases.json'}}>
#SET{releases, #GET{releases}|array_merge{#RELEASES|sinon{#ARRAY{}}}}
</BOUCLE_release_notes>
<B_releases>
#ANCRE_PAGINATION
<BOUCLE_releases(DATA){source table, #GET{releases}}{par released_at}{inverse}{pagination}>
<h3 class="spip">#VERSION</h3>
<ul class="spip">
<li><:supportedversions:released_at:>&nbsp;: [(#RELEASED_AT|affdate)]</li>
<B_announce>
<li>
<:supportedversions:announcement:>&nbsp;:
<BOUCLE_announce(DATA){source table, #ANNOUNCE}{", "}>
<a href="#URL">#LANG</a>
</BOUCLE_announce>
</li>
</B_announce>
[<li>&nbsp;: <a href="(#CHANGELOG)"><:supportedversions:changelog:></a></li>]
<B_download>
<li>
<:supportedversions:download:>&nbsp;:
<ul class="spip">
<BOUCLE_download(DATA){source table, #DOWNLOAD}>
<li>
<a href="#URL">SPIP #VERSION ([(#URL|pathinfo{#CONST{PATHINFO_EXTENSION}})])</a>[<br>
<:supportedversions:download_size:>&nbsp;: (#SIZE|taille_en_octets)]
</li>
</BOUCLE_download>
</ul>
</li>
</B_download>
</ul>
</BOUCLE_releases>
[<nav role="navigation" class="p pagination">(#PAGINATION)</nav>]
</B_releases>

1
pre_releases.json.html

@ -0,0 +1 @@
#HTTP_HEADER{Content-Type: application/json}#HTTP_HEADER{Access-Control-Allow-Origin: *}#MODELE{supportedversions_pre_releases}
Loading…
Cancel
Save