Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs v3 #1213

Merged
merged 3 commits into from
Dec 6, 2023
Merged

docs v3 #1213

merged 3 commits into from
Dec 6, 2023

Conversation

Licini
Copy link
Contributor

@Licini Licini commented Nov 24, 2023

Part of #1214

This involves 2 new major releases of doc-related workflows:

Most of works are done at compas-actions.docsversions:
compas-dev/compas-actions.docversions@v2.2.0...v3.0.0

This one is responsible to look at the gh-pages branch, find out all version folders. Sort them, remove older patches and pre-releases, and finally, generate the versions.json for the doc version drops-down list.
As the shell script approach is becoming too crazy deal with all sorts of version matching and comparing, I'm now switching this to Javascript action so things can be handled more programmatically.

When executed in Github actions, it will print out something like this, so we will have a good idea of what's going on:

All versions:  [
  '1.0.0',
  '1.9.0',
  '1.10.0',
  '1.12.5',
  '1.12.6',
  '2.0.0-alpha.1',
  '2.0.0-beta.2'
]
Formal release versions:  [ '1.0.0', '1.9.0', '1.10.0', '1.12.5', '1.12.6' ]
Stable version:  1.12.6
Version map:  {
  '1.0': [ '1.0.0' ],
  '1.9': [ '1.9.0' ],
  '1.10': [ '1.10.0' ],
  '1.12': [ '1.12.5', '1.12.6' ],
  '2.0': [ '2.0.0-alpha.1', '2.0.0-beta.2' ]
}
To delete:  [ '1.12.5', '2.0.0-alpha.1' ]
Deleted:  1.12.5
Deleted:  2.0.0-alpha.1
Versions JSON:  [
  {
    name: 'Latest',
    version: 'latest',
    url: 'https://compas.dev/compas/latest/'
  },
  {
    name: '2.0.0-beta.2',
    version: '2.0.0-beta.2',
    url: 'https://compas.dev/compas/2.0.0-beta.2/'
  },
  {
    name: '1.12.6 (stable)',
    version: '1.12.6',
    url: 'https://compas.dev/compas/1.12.6/'
  },
  {
    name: '1.10.0',
    version: '1.10.0',
    url: 'https://compas.dev/compas/1.10.0/'
  },
  { name: '1.9.0', version: '1.9.0', url: 'https://compas.dev/compas/1.9.0/' },
  { name: '1.0.0', version: '1.0.0', url: 'https://compas.dev/compas/1.0.0/' }
]

There is also some clean-up and happened at:
compas-dev/compas-actions.docs@v2.3.0...v3.0.0

@Licini Licini marked this pull request as ready for review November 24, 2023 18:22
@Licini
Copy link
Contributor Author

Licini commented Dec 1, 2023

@tomvanmele Any chance to look at this one? It will be nice we have this merged before beta

@Licini Licini merged commit a6bb92e into compas-dev:main Dec 6, 2023
7 of 8 checks passed
@Licini Licini deleted the workflow branch December 22, 2023 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants