mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
[fix] Run npm/gulp at build in Debian rules
The assets building - e.g. npm and bower installation followed by build task -
must be done in the build sequence instead of the install one. The main reason
is logic, we are building something. The second one - which we "fixed" by
adding extra arguments to npm and bower - is due to the user who runs those
sequences: *build* uses a non-privileged one while *install* uses root. It
resulted in npm and bower complaining about using the root user.
Since 03e979f
, bower installation is integrated to npm postinstall, that's
why this issue reappears. This commit also removes the useless `bower install`
command.
This commit is contained in:
parent
0ed417b85e
commit
67caf00f28
1 changed files with 2 additions and 5 deletions
7
debian/rules
vendored
7
debian/rules
vendored
|
@ -14,16 +14,13 @@ TMPDIR = $$(pwd)/debian/yunohost-admin
|
||||||
%:
|
%:
|
||||||
dh $@
|
dh $@
|
||||||
|
|
||||||
override_dh_auto_install:
|
override_dh_auto_build:
|
||||||
# Replace VERSION with current package version to prevent web browser
|
# Replace VERSION with current package version to prevent web browser
|
||||||
# to serve old css/js files
|
# to serve old css/js files
|
||||||
sed -i 's/VERSION/$(DEBVERS)/g' src/index.html
|
sed -i 's/VERSION/$(DEBVERS)/g' src/index.html
|
||||||
|
|
||||||
# Run npm/bower/gulp
|
# Run npm/bower/gulp
|
||||||
# For some unknown reason, the postinstall scripts in package.json cannot be run, and triggers this error :
|
cd src ; npm --progress false --loglevel warn --color false install
|
||||||
# "npm WARN cannot run in wd yunohost-admin@ bower install && gulp build (wd=/build/path)"
|
|
||||||
cd src ; npm --progress false --loglevel warn --color false --unsafe-perm install
|
|
||||||
cd src ; node_modules/bower/bin/bower install --allow-root
|
|
||||||
cd src ; node_modules/gulp/bin/gulp.js build
|
cd src ; node_modules/gulp/bin/gulp.js build
|
||||||
|
|
||||||
override_dh_clean:
|
override_dh_clean:
|
||||||
|
|
Loading…
Add table
Reference in a new issue