Allow users to compile css as part of build release zips for 15.10+

Bug #1517244 reported by Robert Lyon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Confirmed
Wishlist
Unassigned

Bug Description

If users download mahara via zip they don't have access to the sass / compile css feature

Revision history for this message
Robert Lyon (robertl-9) wrote :

We will need to include in the zip file:

package.json
gulpfile.js
Makefile
htdocs/theme/raw/sass/

Revision history for this message
Robert Lyon (robertl-9) wrote :

A plan of action that might work:

Zip/compress all structure that relates to the make css to a file - eg compile_css.zip and save that to the root dir

Then zip up the files for branch release

That way when someone downloads it and wants to use 'make css' they can unzip the compile_css.zip file over their mahara site and it will give them the bits to achieve this

Aaron Wells (u-aaronw)
Changed in mahara:
importance: High → Wishlist
Revision history for this message
Aaron Wells (u-aaronw) wrote :

One thing that gives me pause about this plan, is that our build tools are only really designed to work well on Linux. I can certainly see theme developers trying to do this on a Windows machine and getting hopelessly confused when "make" doesn't work, and they don't know how to install npm or gulp.

We don't want to get into the business of providing tech support for Windows, but maybe we could avoid the problem somewhat by putting a link in there somewhere that tells people to go a helpful (external) URL if they're on a non-Linux system. Like this one looks good: https://www.npmjs.com/package/npm

Revision history for this message
Aaron Wells (u-aaronw) wrote :

I initially thought that people could use the automatic ".zip" files that are generated by gitlab & github, to download the contents of the git repo without having to use git. See for instance: https://git.mahara.org/mahara/mahara/tags

But it turns out that these exclude the Makefile, because of our .gitattributes file: https://git.mahara.org/mahara/mahara/blob/master/.gitattributes

In our release packaging script (release.sh) we were using this along with the "git archive" command to remove the build files from the final release zip file. However, when I rewrote release.sh to include the CSS build process, git archive was no longer suitable for our needs (because it will only include files that are committed into git) so I stopped using it. So, we may as well also remove .gitattributes, and that will make the automated ZIP archives suitable for this purpose, for future releases at least.

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Okay, I've taken the liberty of removing the .gitattributes file from the master and 15.10_STABLE branches, as discussed in the previous comment. No code review necessary because this doesn't affect end users.

Revision history for this message
Aaron Wells (u-aaronw) wrote :

... and now if you use the "Download zip" button on https://git.mahara.org/mahara/mahara or https://git.mahara.org/mahara/mahara/tree/15.10_STABLE (i.e, the branch URLs, not the release tag URLs), the auto-generated ZIP file you receive contains every file in the git repo, including the Makefile and all the others needed to build the themes.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.