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:
commit
6fa7e827e4
4 changed files with 12 additions and 7 deletions
|
@ -19,15 +19,15 @@ jobs:
|
||||||
versionSpec: '12.x'
|
versionSpec: '12.x'
|
||||||
|
|
||||||
- task: Cache@2
|
- task: Cache@2
|
||||||
displayName: 'Check Cache'
|
displayName: 'Cache node_modules'
|
||||||
inputs:
|
inputs:
|
||||||
key: 'yarn | yarn.lock'
|
key: 'yarn | yarn.lock'
|
||||||
path: 'node_modules'
|
path: 'node_modules'
|
||||||
cacheHitVar: CACHE_RESTORED
|
|
||||||
|
|
||||||
- script: 'yarn install --frozen-lockfile'
|
- script: 'yarn install --frozen-lockfile'
|
||||||
displayName: 'Install Dependencies'
|
displayName: 'Install Dependencies'
|
||||||
condition: ne(variables.CACHE_RESTORED, 'true')
|
env:
|
||||||
|
SKIP_PREPARE: 'true'
|
||||||
|
|
||||||
- script: 'yarn build:development'
|
- script: 'yarn build:development'
|
||||||
displayName: 'Build Development'
|
displayName: 'Build Development'
|
||||||
|
|
|
@ -12,15 +12,15 @@ jobs:
|
||||||
versionSpec: '12.x'
|
versionSpec: '12.x'
|
||||||
|
|
||||||
- task: Cache@2
|
- task: Cache@2
|
||||||
displayName: 'Check Cache'
|
displayName: 'Cache node_modules'
|
||||||
inputs:
|
inputs:
|
||||||
key: 'yarn | yarn.lock'
|
key: 'yarn | yarn.lock'
|
||||||
path: 'node_modules'
|
path: 'node_modules'
|
||||||
cacheHitVar: CACHE_RESTORED
|
|
||||||
|
|
||||||
- script: 'yarn install --frozen-lockfile'
|
- script: 'yarn install --frozen-lockfile'
|
||||||
displayName: 'Install Dependencies'
|
displayName: 'Install Dependencies'
|
||||||
condition: ne(variables.CACHE_RESTORED, 'true')
|
env:
|
||||||
|
SKIP_PREPARE: 'true'
|
||||||
|
|
||||||
- script: 'yarn run lint --quiet'
|
- script: 'yarn run lint --quiet'
|
||||||
displayName: 'Run ESLint'
|
displayName: 'Run ESLint'
|
||||||
|
|
|
@ -128,7 +128,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "yarn serve",
|
"start": "yarn serve",
|
||||||
"serve": "webpack serve --config webpack.dev.js",
|
"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:development": "webpack --config webpack.dev.js",
|
||||||
"build:production": "webpack --config webpack.prod.js",
|
"build:production": "webpack --config webpack.prod.js",
|
||||||
"lint": "eslint \".\"",
|
"lint": "eslint \".\"",
|
||||||
|
|
5
scripts/prepare.sh
Executable file
5
scripts/prepare.sh
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [ -z "${SKIP_PREPARE}" ]; then
|
||||||
|
webpack --config webpack.prod.js
|
||||||
|
fi
|
Loading…
Add table
Add a link
Reference in a new issue