Merge pull request #3800 from nielsvanvelzen/no-prepare

Remove NPM prepare script
This commit is contained in:
Joshua M. Boniface
2023-03-12 21:49:13 -04:00
committed by GitHub
9 changed files with 7 additions and 27 deletions
-2
View File
@@ -26,8 +26,6 @@ jobs:
- script: 'npm ci --no-audit'
displayName: 'Install Dependencies'
env:
SKIP_PREPARE: 'true'
- script: 'npm run build:development'
displayName: 'Build Development'
-8
View File
@@ -24,8 +24,6 @@ jobs:
- name: Install Node.js dependencies
run: npm ci --no-audit
env:
SKIP_PREPARE: true
- name: Run a production build
run: npm run build:production
@@ -50,8 +48,6 @@ jobs:
- name: Install Node.js dependencies
run: npm ci --no-audit
env:
SKIP_PREPARE: true
- name: Run eslint
run: npm run lint
@@ -76,8 +72,6 @@ jobs:
- name: Install Node.js dependencies
run: npm ci --no-audit
env:
SKIP_PREPARE: true
- name: Run stylelint
run: npm run stylelint:css
@@ -102,8 +96,6 @@ jobs:
- name: Install Node.js dependencies
run: npm ci --no-audit
env:
SKIP_PREPARE: true
- name: Run stylelint
run: npm run stylelint:scss
+1 -3
View File
@@ -24,8 +24,6 @@ jobs:
- name: Install Node.js dependencies
run: npm ci --no-audit
env:
SKIP_PREPARE: true
- name: Run tsc
run: npm run build:check
run: npm run build:check
+1
View File
@@ -12,6 +12,7 @@ override_dh_clistrip:
override_dh_auto_build:
npm ci --no-audit --unsafe-perm
npm run build:production
mv $(CURDIR)/dist $(CURDIR)/web
override_dh_auto_clean:
+3 -1
View File
@@ -8,4 +8,6 @@ RUN apk add autoconf g++ make libpng-dev gifsicle alpine-sdk automake libtool ma
WORKDIR ${SOURCE_DIR}
COPY . .
RUN npm ci --no-audit --unsafe-perm && mv dist ${ARTIFACT_DIR}
RUN npm ci --no-audit --unsafe-perm \
&& npm run build:production \
&& mv dist ${ARTIFACT_DIR}
+1
View File
@@ -15,6 +15,7 @@ fi
# build archives
npm ci --no-audit --unsafe-perm
npm run build:production
mv dist jellyfin-web_${version}
tar -czf jellyfin-web_${version}_portable.tar.gz jellyfin-web_${version}
rm -rf dist
+1
View File
@@ -35,6 +35,7 @@ chown root:root -R .
%build
npm ci --no-audit --unsafe-perm
npm run build:production
%install
-1
View File
@@ -131,7 +131,6 @@
"scripts": {
"start": "npm run serve",
"serve": "webpack serve --config webpack.dev.js",
"prepare": "node ./scripts/prepare.js",
"build:development": "webpack --config webpack.dev.js",
"build:production": "cross-env NODE_ENV=\"production\" webpack --config webpack.prod.js",
"build:check": "tsc --noEmit",
-12
View File
@@ -1,12 +0,0 @@
const { execSync } = require('child_process');
/**
* The npm `prepare` script needs to run a build to support installing
* a package from git repositories (this is dumb but a limitation of how
* npm behaves). We don't want to run these in CI though because
* building is slow so this script will skip the build when the
* `SKIP_PREPARE` environment variable has been set.
*/
if (!process.env.SKIP_PREPARE) {
execSync('webpack --config webpack.prod.js', { stdio: 'inherit' });
}