1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge pull request #2080 from thornbill/fix-ci-maybe

Add prepare script to allow CI to skip build
This commit is contained in:
dkanada 2020-11-21 22:12:36 +09:00 committed by GitHub
commit 6fa7e827e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 7 deletions

View file

@ -19,15 +19,15 @@ jobs:
versionSpec: '12.x'
- task: Cache@2
displayName: 'Check Cache'
displayName: 'Cache node_modules'
inputs:
key: 'yarn | yarn.lock'
path: 'node_modules'
cacheHitVar: CACHE_RESTORED
- script: 'yarn install --frozen-lockfile'
displayName: 'Install Dependencies'
condition: ne(variables.CACHE_RESTORED, 'true')
env:
SKIP_PREPARE: 'true'
- script: 'yarn build:development'
displayName: 'Build Development'

View file

@ -12,15 +12,15 @@ jobs:
versionSpec: '12.x'
- task: Cache@2
displayName: 'Check Cache'
displayName: 'Cache node_modules'
inputs:
key: 'yarn | yarn.lock'
path: 'node_modules'
cacheHitVar: CACHE_RESTORED
- script: 'yarn install --frozen-lockfile'
displayName: 'Install Dependencies'
condition: ne(variables.CACHE_RESTORED, 'true')
env:
SKIP_PREPARE: 'true'
- script: 'yarn run lint --quiet'
displayName: 'Run ESLint'

View file

@ -128,7 +128,7 @@
"scripts": {
"start": "yarn serve",
"serve": "webpack serve --config webpack.dev.js",
"prepare": "webpack --config webpack.prod.js",
"prepare": "./scripts/prepare.sh",
"build:development": "webpack --config webpack.dev.js",
"build:production": "webpack --config webpack.prod.js",
"lint": "eslint \".\"",

5
scripts/prepare.sh Executable file
View file

@ -0,0 +1,5 @@
#!/usr/bin/env bash
if [ -z "${SKIP_PREPARE}" ]; then
webpack --config webpack.prod.js
fi