[enh] run npm, bower and gulp at build time. make sure it starts from a clean env

This commit is contained in:
Julien Malik 2016-03-04 18:28:20 +01:00
parent 53dd01d62a
commit 6d8a3ad7ba

18
debian/rules vendored
View file

@ -19,7 +19,17 @@ override_dh_auto_install:
# to serve old css/js files
sed -i 's/VERSION/$(DEBVERS)/g' src/index.html
# Install source files and set permissions
mkdir -p $(TMPDIR)/usr/share/yunohost
cp -r src $(TMPDIR)/usr/share/yunohost/admin
chown -R www-data $(TMPDIR)/usr/share/yunohost/admin
# Run npm/bower/gulp
# For some unknown reason, the postinstall scripts in package.json cannot be run, and triggers this error :
# "npm WARN cannot run in wd yunohost-admin@ bower install && gulp build (wd=/build/path)"
cd src ; \
env npm_config_progress=false npm install ; \
node_modules/bower/bin/bower install --allow-root ; \
node_modules/gulp/bin/gulp.js build
override_dh_clean:
dh_clean
rm -rf src/node_modules
rm -rf src/bower_components
rm -rf src/dist