Files
workspace/createAndPush.ps1
aitest 15c4480db1 Add OpenClaw workspace configuration and tools
- Add agent configuration files (AGENTS.md, USER.md, IDENTITY.md, SOUL.md)
- Add git configuration and skills management scripts
- Add frontend/backend analysis tools and reports
- Add DingTalk media sender utilities and documentation
- Fix OpenClaw runtime environment (Node.js and Python)
- Configure git remotes and push scripts
2026-03-05 13:56:59 +09:00

54 lines
1.6 KiB
PowerShell
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Direct仓库创建和推送脚本
$GIT_SERVER = "git.alicorns.co.jp"
$GIT_USER = "aitest"
$GIT_PASSWORD = "Aitest123456"
$REPO1 = "office-file-handler"
$REPO2 = "dingtalk-media-sender"
Write-Host "=== Git Repository Creation and Push ===" -ForegroundColor Green
Write-Host ""
# 尝试方法使用git init在本地创建然后直接推送到远程
Write-Host "Method: Create local bare repo and push" -ForegroundColor Yellow
Write-Host ""
# 为每个技能创建临时裸仓库
foreach ($repo in $REPO1, $REPO2) {
Write-Host "Processing $repo..." -ForegroundColor Cyan
# 设置本地路径
if ($repo -eq $REPO1) {
$localPath = "C:\Users\ALC\.openclaw\skills\$repo"
} else {
$localPath = "$env:USERPROFILE\.openclaw\skills\$repo"
}
# 检查本地仓库
if (!(Test-Path "$localPath\.git")) {
Write-Host "Local git repo not found for $repo"
continue
}
# 尝试推送
Set-Location $localPath
$remoteUrl = "https://$GIT_USER`:$GIT_PASSWORD@$GIT_SERVER/$repo.git"
Write-Host "Attempting to push to $remoteUrl"
# 先尝试推送,看看是否会提示创建
$result = git push -u origin master 2>&1
if ($LASTEXITCODE -eq 0) {
Write-Host "[SUCCESS] $repo pushed successfully!" -ForegroundColor Green
} else {
Write-Host "[FAILED] $repo push failed: $result" -ForegroundColor Red
}
Write-Host ""
}
Write-Host "=== Summary ===" -ForegroundColor Green
Write-Host "If push failed, repositories need to be created manually on the Git server." -ForegroundColor Yellow