mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-23 05:33:08 +03:00
chore: support http proxy in bump script (#8098)
This commit is contained in:
parent
93ae724c66
commit
416faba2bc
13
tools/bump-blocksuite/README.md
Normal file
13
tools/bump-blocksuite/README.md
Normal file
@ -0,0 +1,13 @@
|
||||
# Bump BlockSuite
|
||||
|
||||
To update BlockSuite, run following command in project root:
|
||||
|
||||
```sh
|
||||
node scripts/bump-blocksuite.js
|
||||
```
|
||||
|
||||
For network issue, try setting proxy environment variables:
|
||||
|
||||
```sh
|
||||
export http_proxy=http://127.0.0.1:7890
|
||||
```
|
@ -11,6 +11,7 @@ import {
|
||||
Sort,
|
||||
} from '@napi-rs/simple-git';
|
||||
import chalk from 'chalk';
|
||||
import { ProxyAgent, setGlobalDispatcher } from 'undici';
|
||||
|
||||
import corePackage from '../../packages/frontend/core/package.json' assert { type: 'json' };
|
||||
|
||||
@ -32,6 +33,10 @@ if (oldHash === latestHash) {
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
if (process.env.http_proxy) {
|
||||
setGlobalDispatcher(new ProxyAgent(process.env.http_proxy));
|
||||
}
|
||||
|
||||
console.info(`Upgrade blocksuite from ${oldHash} -> ${latestHash}`);
|
||||
|
||||
const blockSuiteDeps = execSync(`yarn info -A --name-only --json`, {
|
||||
|
@ -8,6 +8,7 @@
|
||||
"dependencies": {
|
||||
"@napi-rs/clipboard": "^1.1.2",
|
||||
"@napi-rs/simple-git": "^0.1.18",
|
||||
"chalk": "^5.3.0"
|
||||
"chalk": "^5.3.0",
|
||||
"undici": "^6.12.0"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user