зеркало из https://github.com/electron/electron.git
feat: configure use remote checksums via rc (#40253)
* feat: support for configuring use_remote_checksums via .npmrc * docs: support for configuring use_remote_checksums via .npmrc --------- Co-authored-by: jiujianian <jiujianian@bytedance.com>
This commit is contained in:
Родитель
29d7be1565
Коммит
f526206095
|
@ -91,9 +91,9 @@ The above configuration will download from URLs such as
|
|||
`https://npmmirror.com/mirrors/electron/8.0.0/electron-v8.0.0-linux-x64.zip`.
|
||||
|
||||
If your mirror serves artifacts with different checksums to the official
|
||||
Electron release you may have to set `electron_use_remote_checksums=1` to
|
||||
force Electron to use the remote `SHASUMS256.txt` file to verify the checksum
|
||||
instead of the embedded checksums.
|
||||
Electron release you may have to set `electron_use_remote_checksums=1` directly,
|
||||
or configure it in a `.npmrc` file, to force Electron to use the remote `SHASUMS256.txt`
|
||||
file to verify the checksum instead of the embedded checksums.
|
||||
|
||||
#### Cache
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ downloadArtifact({
|
|||
artifactName: 'electron',
|
||||
force: process.env.force_no_cache === 'true',
|
||||
cacheRoot: process.env.electron_config_cache,
|
||||
checksums: process.env.electron_use_remote_checksums ? undefined : require('./checksums.json'),
|
||||
checksums: process.env.electron_use_remote_checksums ?? process.env.npm_config_electron_use_remote_checksums ? undefined : require('./checksums.json'),
|
||||
platform,
|
||||
arch
|
||||
}).then(extractFile).catch(err => {
|
||||
|
|
Загрузка…
Ссылка в новой задаче