chore: point Gitea helpers at reachable host 210.126.232.10:3000
This commit is contained in:
1 parent
33793a4fe1
commit
50cda6f5c1
2 files changed
+5
-5
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
/**
|
/**
|
||||||
* 创建/推送到 Gitea(默认 http://10.126.232.10:3000)。
|
* 创建/推送到 Gitea(默认 http://210.126.232.10:3000)。
|
||||||
* 用法:
|
* 用法:
|
||||||
* GITEA_TOKEN=<token> node scripts/push-to-gitea.mjs
|
* GITEA_TOKEN=<token> node scripts/push-to-gitea.mjs
|
||||||
* 可选环境变量:GITEA_URL、GITEA_REPO、GITEA_PUBLIC=1
|
* 可选环境变量:GITEA_URL、GITEA_REPO、GITEA_PUBLIC=1
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
import { spawnSync } from 'node:child_process';
|
import { spawnSync } from 'node:child_process';
|
||||||
|
|
||||||
const base = (process.env.GITEA_URL || 'http://10.126.232.10:3000').replace(/\/+$/, '');
|
const base = (process.env.GITEA_URL || 'http://210.126.232.10:3000').replace(/\/+$/, '');
|
||||||
const token = (process.env.GITEA_TOKEN || '').trim();
|
const token = (process.env.GITEA_TOKEN || '').trim();
|
||||||
const repo = process.env.GITEA_REPO || 'classhelper-island-refactor-prompt';
|
const repo = process.env.GITEA_REPO || 'classhelper-island-refactor-prompt';
|
||||||
const isPublic = process.env.GITEA_PUBLIC === '1';
|
const isPublic = process.env.GITEA_PUBLIC === '1';
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
# 将本仓库创建/推送到 Gitea(默认目标 http://10.126.232.10:3000)
|
# 将本仓库创建/推送到 Gitea(默认目标 http://210.126.232.10:3000)
|
||||||
# 用法:
|
# 用法:
|
||||||
# $env:GITEA_TOKEN = '<你的 Gitea 访问令牌>'
|
# $env:GITEA_TOKEN = '<你的 Gitea 访问令牌>'
|
||||||
# $env:GITEA_URL = 'http://10.126.232.10:3000' # 可选
|
# $env:GITEA_URL = 'http://210.126.232.10:3000' # 可选
|
||||||
# $env:GITEA_REPO = 'classhelper-island-refactor-prompt' # 可选
|
# $env:GITEA_REPO = 'classhelper-island-refactor-prompt' # 可选
|
||||||
# pwsh -File scripts/push-to-gitea.ps1
|
# pwsh -File scripts/push-to-gitea.ps1
|
||||||
# 说明:令牌只从环境变量读取,不写入仓库文件;推送完成后会把 origin 还原为不含凭据的 URL。
|
# 说明:令牌只从环境变量读取,不写入仓库文件;推送完成后会把 origin 还原为不含凭据的 URL。
|
||||||
param(
|
param(
|
||||||
[string]$RepoName = $(if ($env:GITEA_REPO) { $env:GITEA_REPO } else { 'classhelper-island-refactor-prompt' }),
|
[string]$RepoName = $(if ($env:GITEA_REPO) { $env:GITEA_REPO } else { 'classhelper-island-refactor-prompt' }),
|
||||||
[string]$BaseUrl = $(if ($env:GITEA_URL) { $env:GITEA_URL } else { 'http://10.126.232.10:3000' }),
|
[string]$BaseUrl = $(if ($env:GITEA_URL) { $env:GITEA_URL } else { 'http://210.126.232.10:3000' }),
|
||||||
[switch]$Public
|
[switch]$Public
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user