chore: workspace-bootstrap перенесён в Answer.and.other.shit

guides/init.new.comps — см. scripts/workspace-bootstrap/README.md
This commit is contained in:
Andrey Lutsenko
2026-06-14 19:43:05 +10:00
parent 834595df6b
commit 027d64f245
18 changed files with 15 additions and 783 deletions
+6 -59
View File
@@ -1,67 +1,14 @@
# Workspace bootstrap
# Перенесено
Единая настройка **Mac / Windows** для Git (SSH), Cursor и политики push.
Скрипты настройки новых компьютеров живут в репозитории **Answer.and.other.shit**:
Целевое место в Gitea: репозиторий **Answer.and.other.shit** (можно скопировать эту папку в `scripts/workspace-bootstrap/`).
## Быстрый старт (новая машина)
**`guides/init.new.comps/`**
```bash
# 1. Клонировать bootstrap (или весь Answer.and.other.shit)
cd scripts/workspace-bootstrap
# 2. Секреты и адреса — один файл (не в git!)
git clone ssh://git@git.kalinamall.ru:2222/PapaTramp/Answer.and.other.shit.git
cd Answer.and.other.shit/guides/init.new.comps
cp config/workspace.local.env.example config/workspace.local.env
# отредактировать workspace.local.env
# 3. Машина: SSH, git, клоны, remotes
./init-machine.sh
# 4. Cursor: правила в проекты
./init-cursor.sh
# 5. Добавить ~/.ssh/id_ed25519_kalinamall.pub в Gitea (kalinamall + home) и GitHub
./init-machine.sh --verify
```
Windows (PowerShell):
```powershell
cd scripts\workspace-bootstrap
copy config\workspace.local.env.example config\workspace.local.env
# отредактировать
.\init-machine.ps1
.\init-cursor.sh # через Git Bash, или: bash init-cursor.sh
.\init-machine.ps1 -Verify
```
## Файлы
| Файл | В git | Назначение |
|------|-------|------------|
| `config/workspace.local.env.example` | да | шаблон |
| `config/workspace.local.env` | **нет** | логины, IP, пароли, пути |
| `config/repos.yaml` | да | список репозиториев |
| `config/ssh-config.template` | да | `~/.ssh/config` |
| `config/hosts.template` | да | строки для `/etc/hosts` или `C:\Windows\System32\drivers\etc\hosts` |
## Push
```bash
cd ~/Documents/Cursor/Projects/reverse-proxy
../../reverse-proxy/scripts/workspace-bootstrap/push-safe.sh
# или из bootstrap: ./push-safe.sh /path/to/repo
```
- **kalinamall** — всегда (с секретами)
- **home** — если `PUSH_HOME=yes` в env
- **github** — только после `check-no-secrets.sh`
## Переменная окружения
```bash
export WORKSPACE_ENV=/path/to/workspace.local.env
./init-machine.sh
```
По умолчанию: `config/workspace.local.env` рядом со скриптами.
См. [docs/git.md](../../docs/git.md) и [docs/repo-policy.md](../../docs/repo-policy.md).