Working on installer.to with SCoRe Lab for GSoC 2020: Week 7
My previous Medium article got published under SCoRe as https://medium.com/scorelab/working-on-installer-to-with-score-lab-for-gsoc-2020-week-6-744ba388c9ee
This week I started working on a small value addition for the installer scripts. That is logs! We simply echo the outputs when we need but these does not contain any information like time log level, etc.
I also added colored outputs which made the logs looks super cool! See the below screenshot.
I made this small logger functions in to a small independent library that anyone interested can import and use! Here is the link https://github.com/Heshdude/log-dude
I looked into the minifying as promised and after several unsuccessful attempts to use several other 3rd party minifying script, I ended up using https://github.com/Zuzzuc/Bash-minifier. It’s a more elegant tool to minify the bash scripts and has a MIT licence. Thus I brought in the script into the ‘Installer.sh’ repo.
Now I’m using this minifier to minify my installer scripts and I have set it up at the CD step. Now, whenever we change a installer TOML, the CD process will generate a installer.sh
and then the minifier will minify these installer.sh
s into installer.min.sh
and finally these will be uploaded to the Cloud storage bucket.
With Minification, scripts are around 5% smaller than the original scripts, but I still see some more room for improvements, like this minifier is not changing the variable names into short names. I will be looking into solve this issue soon.