mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-27 10:52:40 +08:00
chore: support http proxy in bump script (#8098)
This commit is contained in:
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,
|
Sort,
|
||||||
} from '@napi-rs/simple-git';
|
} from '@napi-rs/simple-git';
|
||||||
import chalk from 'chalk';
|
import chalk from 'chalk';
|
||||||
|
import { ProxyAgent, setGlobalDispatcher } from 'undici';
|
||||||
|
|
||||||
import corePackage from '../../packages/frontend/core/package.json' assert { type: 'json' };
|
import corePackage from '../../packages/frontend/core/package.json' assert { type: 'json' };
|
||||||
|
|
||||||
@@ -32,6 +33,10 @@ if (oldHash === latestHash) {
|
|||||||
process.exit(0);
|
process.exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (process.env.http_proxy) {
|
||||||
|
setGlobalDispatcher(new ProxyAgent(process.env.http_proxy));
|
||||||
|
}
|
||||||
|
|
||||||
console.info(`Upgrade blocksuite from ${oldHash} -> ${latestHash}`);
|
console.info(`Upgrade blocksuite from ${oldHash} -> ${latestHash}`);
|
||||||
|
|
||||||
const blockSuiteDeps = execSync(`yarn info -A --name-only --json`, {
|
const blockSuiteDeps = execSync(`yarn info -A --name-only --json`, {
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@napi-rs/clipboard": "^1.1.2",
|
"@napi-rs/clipboard": "^1.1.2",
|
||||||
"@napi-rs/simple-git": "^0.1.18",
|
"@napi-rs/simple-git": "^0.1.18",
|
||||||
"chalk": "^5.3.0"
|
"chalk": "^5.3.0",
|
||||||
|
"undici": "^6.12.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -228,6 +228,7 @@ __metadata:
|
|||||||
"@napi-rs/clipboard": "npm:^1.1.2"
|
"@napi-rs/clipboard": "npm:^1.1.2"
|
||||||
"@napi-rs/simple-git": "npm:^0.1.18"
|
"@napi-rs/simple-git": "npm:^0.1.18"
|
||||||
chalk: "npm:^5.3.0"
|
chalk: "npm:^5.3.0"
|
||||||
|
undici: "npm:^6.12.0"
|
||||||
languageName: unknown
|
languageName: unknown
|
||||||
linkType: soft
|
linkType: soft
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user