This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
$ErrorActionPreference = "Stop"
|
||||
$expected = "Z:\mst\codex\assistent"
|
||||
Write-Host "Assistant bootstrap"
|
||||
Write-Host "Current: $((Get-Location).Path)"
|
||||
if ((Get-Location).Path -ne $expected) { Write-Warning "Expected local project folder is $expected (warning only)." }
|
||||
|
||||
if (-not (Test-Path .git)) { git init }
|
||||
$remotes = @(git remote 2>$null)
|
||||
if ($remotes -notcontains "origin") { git remote add origin "https://git.cin.su/m/Assistant.git" }
|
||||
else {
|
||||
$origin = git remote get-url origin
|
||||
if ($origin -ne "https://git.cin.su/m/Assistant.git") { Write-Warning "origin is $origin, expected https://git.cin.su/m/Assistant.git" }
|
||||
}
|
||||
|
||||
if (-not (Test-Path .env.local)) { Copy-Item .env.example .env.local; Write-Host "Created .env.local. Replace local-only placeholders before use." }
|
||||
|
||||
Write-Host "Checking remote read access..."
|
||||
git ls-remote origin 2>$null | Out-Null
|
||||
if ($LASTEXITCODE -eq 0) { Write-Host "Git remote reachable." } else { Write-Warning "Git remote/auth not available. Let Git Credential Manager handle auth or ask user for token." }
|
||||
|
||||
Write-Host "Next: go run ./cmd/devctl doctor"
|
||||
Write-Host "Then: go run ./cmd/devctl check-architecture"
|
||||
Write-Host "Then: go test ./..."
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env sh
|
||||
set -eu
|
||||
[ -d .git ] || git init
|
||||
if ! git remote get-url origin >/dev/null 2>&1; then git remote add origin https://git.cin.su/m/Assistant.git; fi
|
||||
[ -f .env.local ] || cp .env.example .env.local
|
||||
printf '%s\n' 'Run: go run ./cmd/devctl doctor && go run ./cmd/devctl check-architecture && go test ./...'
|
||||
Reference in New Issue
Block a user