05-20-2022, 10:37 PM
I use an iMac for building the sources using the Gulp toolset and a clone of the "moode" repo.
From from a target moOde Pi I mount a Samba share on my iMac named "Software" that corresponds to ~Documents/Software/ below. The mount is actually //iMac/Software/moode-player to /mnt/moode-player.
Then after a Gulp build I can install the updated sources on a moOde Pi via the commands below.
From from a target moOde Pi I mount a Samba share on my iMac named "Software" that corresponds to ~Documents/Software/ below. The mount is actually //iMac/Software/moode-player to /mnt/moode-player.
Code:
lt5user@LT5 moode % sudo node_modules/.bin/gulp build && sudo node_modules/.bin/gulp deploy --test
Password:
[09:42:53] Using gulpfile ~/Documents/Software/moode-player/GitHub/moode/gulpfile.js
[09:42:53] Starting 'build'...
[09:42:53] Starting 'sass'...
[09:42:53] Finished 'sass' after 1.05 ms
[09:42:53] Starting 'genindexdev'...
[09:42:53] Finished 'genindexdev' after 149 ms
[09:42:53] Starting 'genindex'...
[09:42:53] Finished 'genindex' after 161 ms
[09:42:53] Starting 'bundle'...
[09:42:53] Starting 'cache'...
[09:42:53] Finished 'cache' after 250 ms
[09:42:53] Starting 'maps'...
[09:42:53] Finished 'maps' after 87 ms
[09:42:53] Starting '<anonymous>'...
[09:42:54] index.html 11 kB
[09:42:54] css/main.min.css 1.44 kB
[09:42:54] css/styles.min.css 226 kB
[09:42:54] js/config.min.js 19.2 kB
[09:42:54] js/main.min.js 128 kB
[09:42:55] js/lib.min.js 557 kB
[09:42:55] all files 943 kB
[09:42:55] Finished '<anonymous>' after 1.33 s
[09:42:55] Finished 'bundle' after 1.67 s
[09:42:55] Starting 'artwork'...
[09:42:55] Finished 'artwork' after 4.4 ms
[09:42:55] Starting '<anonymous>'...
[09:42:55] Finished '<anonymous>' after 566 μs
[09:42:55] Finished 'build' after 1.99 s
[09:42:56] Using gulpfile ~/Documents/Software/moode-player/GitHub/moode/gulpfile.js
[09:42:56] Starting 'deploy'...
[09:42:56] Starting 'deployfront'...
[09:42:56] Finished 'deployfront' after 362 ms
[09:42:56] Starting 'deployback'...
[09:42:56] Starting 'patchheader'...
[09:42:56] header.php 11.8 kB
[09:42:56] Finished 'patchheader' after 118 ms
[09:42:56] Starting 'patchfooter'...
[09:42:56] footer.min.php 8 kB
[09:42:56] Finished 'patchfooter' after 176 ms
[09:42:56] Starting 'patchindex'...
[09:42:56] Finished 'patchindex' after 5.9 ms
[09:42:56] Starting 'patchconfigs'...
[09:42:57] net-config.php 11.3 kB
[09:42:57] Finished 'patchconfigs' after 32 ms
[09:42:57] Starting 'minifyhtml'...
[09:42:57] indextpl.min.html 135 kB
[09:42:57] Finished 'minifyhtml' after 159 ms
[09:42:57] Starting '<anonymous>'...
[09:42:57] Finished '<anonymous>' after 710 ms
[09:42:57] Finished 'deployback' after 1.2 s
[09:42:57] Starting '<anonymous>'...
[09:42:57] Finished '<anonymous>' after 250 μs
[09:42:57] Finished 'deploy' after 1.57 s
lt5user@LT5 moode %
Then after a Gulp build I can install the updated sources on a moOde Pi via the commands below.
Code:
# Purge and Reload /var/www/
sudo ./devutl.sh -m (NOTE: This is a script that does the mount to my iMac)
sudo find /var/www/* -delete
sudo cp -r /mnt/moode-player/GitHub/moode/build/dist/var/www/* /var/www/
sudo cp /mnt/moode-player/GitHub/moode/usr/local/bin/moodeutl /usr/local/bin/
sudo chmod -R 0755 /var/www/
THEME_NAME=$(moodeutl -q "SELECT value FROM cfg_system WHERE param='themename'")
THEME_COLOR=$(moodeutl -q "SELECT bg_color FROM cfg_theme WHERE theme_name='$THEME_NAME'")
sudo sed -i '/<meta name="theme-color" content=/c\ \t<meta name="theme-color" content="rgb($THEME_COLOR)">' /var/www/header.php
sudo reboot