mirror of
https://github.com/YunoHost/vinaigrette.git
synced 2024-09-03 20:06:11 +02:00
Drop support for stretch build (was already broken anyway because of sh syntax ?\!), simplify mysterious npm install hook
This commit is contained in:
parent
b033d5de83
commit
eb9b5dbb3a
1 changed files with 1 additions and 42 deletions
|
@ -8,53 +8,12 @@
|
||||||
|
|
||||||
if ls -d /build/yunohost-admin* >dev/null 2>&1
|
if ls -d /build/yunohost-admin* >dev/null 2>&1
|
||||||
then
|
then
|
||||||
echo "======================================================"
|
|
||||||
DIST="$(cat /etc/os-release | grep CODENAME= | cut -d = -f 2)"
|
|
||||||
if [ "$DIST" == "stretch" ]
|
|
||||||
then
|
|
||||||
/usr/bin/apt-get install git nodejs -y
|
|
||||||
echo "========================"
|
|
||||||
echo "Patching debian/rules ..."
|
|
||||||
echo "========================"
|
|
||||||
cd /build/yunohost-admin*
|
|
||||||
cat << EOF > rules.patch
|
|
||||||
diff --git a/debian/rules b/debian/rules
|
|
||||||
index b031511..477f27c 100755
|
|
||||||
--- a/debian/rules
|
|
||||||
+++ b/debian/rules
|
|
||||||
@@ -20,12 +20,14 @@ override_dh_auto_build:
|
|
||||||
sed -i 's/VERSION/\$(DEBVERS)/g' src/index.html
|
|
||||||
|
|
||||||
# Run npm/bower/gulp
|
|
||||||
- cd src ; npm --progress false --loglevel warn --color false install
|
|
||||||
+ #cd src ; npm --progress false --loglevel warn --color false install
|
|
||||||
cd src ; node_modules/gulp/bin/gulp.js build
|
|
||||||
+ rm -rf src/node_modules
|
|
||||||
+ rm -rf src/bower_components
|
|
||||||
|
|
||||||
override_dh_clean:
|
|
||||||
dh_clean
|
|
||||||
- rm -rf src/node_modules
|
|
||||||
- rm -rf src/bower_components
|
|
||||||
+ #rm -rf src/node_modules
|
|
||||||
+ #rm -rf src/bower_components
|
|
||||||
rm -rf src/dist
|
|
||||||
EOF
|
|
||||||
patch -p1 < rules.patch
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "========================"
|
echo "========================"
|
||||||
echo "Starting npm install ..."
|
echo "Starting npm install ..."
|
||||||
echo "========================"
|
echo "========================"
|
||||||
mkdir /nonexistent
|
mkdir /nonexistent
|
||||||
chown pbuilder:pbuilder /nonexistent
|
chown pbuilder:pbuilder /nonexistent
|
||||||
cd /build/yunohost-admin*/app
|
cd /build/yunohost-admin*/app
|
||||||
if [ "$DIST" == "stretch" ]
|
su pbuilder -c "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin npm --progress false ci"
|
||||||
then
|
|
||||||
su pbuilder -c "npm install"
|
|
||||||
else
|
|
||||||
su pbuilder -c "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin npm ci"
|
|
||||||
fi
|
|
||||||
echo "======================================================"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue