use --frozen-lockfile to ensure dependency integrity across builds

This commit is contained in:
Björn Dalfors
2024-04-08 10:46:22 +02:00
parent 613d0d7178
commit e21011fce1
4 changed files with 6 additions and 6 deletions

View File

@@ -25,7 +25,7 @@ services:
- docker - docker
install: install:
- yarn install - yarn install --frozen-lockfile
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update && sudo apt-get -y install snap squashfs-tools && sudo snap install snapcraft --classic; fi; - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update && sudo apt-get -y install snap squashfs-tools && sudo snap install snapcraft --classic; fi;
script: script:

View File

@@ -10,7 +10,7 @@ install:
- ps: Install-Product node 19 - ps: Install-Product node 19
build_script: build_script:
- yarn - yarn install --frozen-lockfile
- yarn build - yarn build
- yarn prepare-release - yarn prepare-release
- yarn package appx - yarn package appx

View File

@@ -5,7 +5,7 @@ git clone https://github.com/thomasnordquist/MQTT-Explorer.git /app
cd /app cd /app
git checkout travis-ui-tests git checkout travis-ui-tests
yarn yarn install --frozen-lockfile
yarn build yarn build
yarn ui-test yarn ui-test

View File

@@ -17,18 +17,18 @@ async function prepareRelease() {
// Install app dependencies // Install app dependencies
chdir('app') chdir('app')
await exec('yarn') await exec('yarn', ['install', '--frozen-lockfile'])
chdir('..') chdir('..')
// Install electron dependencies // Install electron dependencies
await exec('yarn') await exec('yarn', ['install', '--frozen-lockfile'])
// Build App and Electron backend // Build App and Electron backend
await exec('yarn', ['build']) await exec('yarn', ['build'])
// Clean up // Clean up
await fs.remove('node_modules') await fs.remove('node_modules')
await exec('yarn', ['install', '--production']) // Do not clean up, electron version detection will fail otherwise await exec('yarn', ['install', '--production', '--frozen-lockfile']) // Do not clean up, electron version detection will fail otherwise
await fs.remove(path.join('app', 'node_modules')) await fs.remove(path.join('app', 'node_modules'))
chdir(originalDir) chdir(originalDir)