v1: executing-plans 模式生成,54 文件 1320 行 Python
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
# Gitea Git 初始化 + 提交 + 推送
|
||||
# 运行前填写以下 6 个变量
|
||||
|
||||
$GIT_USER_NAME = "hangshuo652"
|
||||
$GIT_USER_EMAIL = "hangshuo652@example.com"
|
||||
$GITEA_URL = "https://gittea.dev"
|
||||
$GITEA_USER = "hangshuo652"
|
||||
$GITEA_TOKEN = "f4a192e8211c3dce8072231bd8c1f6c999aca380"
|
||||
$REPO_NAME = "verify-cli"
|
||||
|
||||
Set-Location $PSScriptRoot
|
||||
|
||||
if ($GIT_USER_NAME -eq "" -or $GIT_USER_EMAIL -eq "") {
|
||||
Write-Host "请填写脚本顶部的配置变量"
|
||||
return
|
||||
}
|
||||
|
||||
# 构建仓库 URL
|
||||
if ($GITEA_USER -ne "" -and $GITEA_TOKEN -ne "") {
|
||||
$uri = [System.Uri]$GITEA_URL
|
||||
$REPO_URL = "$($uri.Scheme)://${GITEA_USER}:${GITEA_TOKEN}@$($uri.Host)/${GITEA_USER}/${REPO_NAME}.git"
|
||||
} else {
|
||||
$REPO_URL = ""
|
||||
}
|
||||
|
||||
git init
|
||||
git config user.name $GIT_USER_NAME
|
||||
git config user.email $GIT_USER_EMAIL
|
||||
|
||||
git add .
|
||||
git commit -m "v1: executing-plans 模式生成,54 文件 1320 行 Python"
|
||||
|
||||
if ($REPO_URL -ne "") {
|
||||
git remote add origin $REPO_URL
|
||||
git branch -M main
|
||||
git push -u origin main
|
||||
Write-Host "已推送至 Gitea"
|
||||
} else {
|
||||
Write-Host "仅本地提交。设置 GITEA_USER + GITEA_TOKEN + REPO_NAME 后可推送"
|
||||
}
|
||||
Reference in New Issue
Block a user