*Context*
We'd like to have a build script/process for an extension so that I can perform certain commands to install dependencies and perform optimizations on the extension sources. For example, on front-end sources.
Some examples could be:
- Installing libraries from bower or npm and bundling them into the resources folder - Applying post processing steps to CSS with something like post css - Optimizing images
We are aware of other projects that have build processes for building deployables, but not extensions. Such projects have different ways of dealing with this. A common way is having a repository called <Project>/deploy and in there you pull from <Project> and run the build scripts, and that is the repository that gets deployed.
*Current system*
The current way we usually do this (if we do) is run those build scripts/jobs on the developers machines and commit them into the git repository on master.
With this system, if you don't enforce anything in CI, then build processes may be skipped (human error).
If you enforce it (by running the process and comparing with what has been committed in CI) then patches merged to master that touch the same files will produce merge conflicts with existing open patches, forcing a rebase+rebuild on open patches every time one is merged on master.
*Questions*
Can we have a shared configuration/convention/system for having a build step on mediawiki extensions?
- So that a build process is run - on CI jobs that require production assets like the selenium jobs - on the deployment job that deploys the extension to the beta cluster and to production
How would it look like? Are any extensions doing a pre-deployment build step?
Thanks.