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

For v 2.0+ we need to create an actual distribution package #316

Open
martindholmes opened this issue Sep 25, 2024 · 7 comments
Open

For v 2.0+ we need to create an actual distribution package #316

martindholmes opened this issue Sep 25, 2024 · 7 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request release-blocker The dev branch must not be merged into master while a release-blocker bug is open.
Milestone

Comments

@martindholmes
Copy link
Collaborator

In addition to supplying a sample config file with full comments, we should actually have a script which builds a distribution for end-users. We can exclude lots of bits and pieces such as the ci and jenkins folders, the documentation config file, and so on, making for a less cluttered package. We should also have a decent version of the built documentation, which needs to function locally (so can't have a search), but could point to the online version which does.

@martindholmes martindholmes added documentation Improvements or additions to documentation enhancement New feature or request release-blocker The dev branch must not be merged into master while a release-blocker bug is open. labels Sep 25, 2024
@martindholmes martindholmes added this to the Release 2.0 milestone Sep 25, 2024
@martindholmes
Copy link
Collaborator Author

martindholmes commented Oct 23, 2024

Starting a plan for this. We need:

  1. a buildRelease.xml ant file.
  2. a diagnostics.xsl file which checks a bunch of things before a release can be made.

The ant file should run the diagnostics, and parse the results to discover whether it's possible to proceed.
If not, it reports the fixes needed. These may be things like not being on a release branch; not having a documentation whatsnew div with the version matching the EDITION file; and more, as we think of things.
If so, it will:

  • build the documentation to create the single HTML version for distribution;
  • create a folder called release-x.y.z;
  • copy all content into it;
  • create zip and tar.gz archives of that folder.

Questions remaining:

  1. Do we include the test content so the user can run a local test, or is that confusing?
  2. Do we provide a sample template for a config file?
  3. Do we include the documentation build process as another potentially useful test?

@martindholmes
Copy link
Collaborator Author

martindholmes commented Dec 31, 2024

A pressing question before we can proceed with this:

Do we pre-build the JavaScript as part of the package creation, meaning that we can dispense with the Closure compiler in the distribution package, or do we leave that part of the build to be done every time? If we precompile, we'll have to rewrite the main build file to use the precompiled code instead of compiling it; it could look to see if a precompiled package is in a specific location and if so, use it, otherwise try to compile.

My instinct is to leave the compilation process as-is, and run it every time a site is indexed; that will make it easier for people to customize the JS. But it will mean that the distribution package is a little heavier.

@martindholmes
Copy link
Collaborator Author

I've completed a first implementation of this, and I now need to test it on some real projects.

@martindholmes
Copy link
Collaborator Author

Tweaked and tested, so PR coming.

@joeytakeda
Copy link
Contributor

Thanks for all this, @martindholmes !

Re the compilation of the JS: I think it would be great if we could move away from compiling every time if possible (especially if we move toward ES6 modules rather than concatenation of files), but I think that's a different issue. So I think for now it's fine to leave the compilation process as-is, especially given that people won't be using the JS without running the build process anyway.

@martindholmes
Copy link
Collaborator Author

Yes, I think this could be a 2.1 change: the build process only compiles the js if there are no compiled versions, or if the source js is newer than the compiled versions. However that means that if you use the release package, you can't customize the js because (presumably) we no longer ship the compiler. You'd have to clone the repo to do any customization.

@martindholmes
Copy link
Collaborator Author

Moving this along to the 2.1 milestone, for consideration of distributing pre-compiled versions of the JS in the distro package.

@martindholmes martindholmes modified the milestones: Release 2.0, Release 2.1 Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request release-blocker The dev branch must not be merged into master while a release-blocker bug is open.
Projects
None yet
Development

No branches or pull requests

2 participants