diff --git a/Jenkinsfile b/Jenkinsfile index 14e945d8..dbea67c5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -29,25 +29,6 @@ pipeline { setEnv() } } - stage('Build') { - when { - anyOf { - branch 'master' - branch 'test' - } - } - environment { - NODE_ENV = "" - } - steps { - nodejs('node-v14') { - sh 'npm install --no-audit --prefer-offline' - sh 'npm --production run build' - sh 'cp package.json package-lock.json build' - sh 'cd build && npm install --omit=dev --no-audit --prefer-offline' - } - } - } stage('Debuild') { when { anyOf { diff --git a/debian/compat b/debian/compat index f11c82a4..9a037142 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -9 \ No newline at end of file +10 \ No newline at end of file diff --git a/debian/control b/debian/control index c7bac855..0e1b8ae8 100644 --- a/debian/control +++ b/debian/control @@ -1,7 +1,7 @@ Source: hedera-web Priority: optional Maintainer: Juan Ferrer Toribio -Build-Depends: build-essential, debhelper +Build-Depends: build-essential, debhelper, nodejs Standards-Version: 3.9.3 Section: misc Homepage: https://verdnatura.es diff --git a/debian/install b/debian/install index d1f12556..2a89565f 100644 --- a/debian/install +++ b/debian/install @@ -16,4 +16,4 @@ package.json usr/share/hedera-web build usr/share/hedera-web README.md usr/share/hedera-web webpack.config.json usr/share/hedera-web -build/node_modules usr/share/hedera-web +build-deps/node_modules usr/share/hedera-web diff --git a/debian/rules b/debian/rules index 31c1c177..996f168a 100755 --- a/debian/rules +++ b/debian/rules @@ -4,3 +4,15 @@ %: dh $@ + +clean: + npm --production run clean + dh_clean $@ + +build: + npm install --no-audit --prefer-offline + npm --production run build + + mkdir build-deps + cp package.json package-lock.json build-deps + (cd build-deps && npm install --omit=dev --no-audit --prefer-offline)