feat: workspace-bootstrap — init SSH/git/Cursor для Mac и Windows

Единый workspace.local.env для адресов и паролей, init-machine,
Set-GitRemotes, push-safe и check-no-secrets для политики kalinamall/github.
This commit is contained in:
Andrey Lutsenko
2026-06-14 19:34:52 +10:00
parent 8e2a4ac1b9
commit 834595df6b
18 changed files with 813 additions and 8 deletions
+32
View File
@@ -0,0 +1,32 @@
#!/usr/bin/env bash
set -Eeuo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
# shellcheck source=lib/common.sh
source "$ROOT/lib/common.sh"
REPO_DIR="${1:-.}"
[[ -d $REPO_DIR ]] || die "каталог не найден: $REPO_DIR"
cd "$REPO_DIR"
[[ -d .git ]] || die "не git: $REPO_DIR"
load_workspace_env
BRANCH=$(git rev-parse --abbrev-ref HEAD)
log "push-safe в $(pwd) ветка $BRANCH"
git push kalinamall "$BRANCH" || die "push kalinamall failed"
if [[ ${PUSH_HOME:-yes} == yes ]]; then
git push home "$BRANCH" || log "push home пропущен (сеть?)"
fi
if [[ ${PUSH_GITHUB:-yes} == yes ]] && git remote | grep -qx github; then
bash "$ROOT/scripts/check-no-secrets.sh" || exit 1
git push github "$BRANCH" || die "push github failed"
log "github OK"
else
log "github remote нет или PUSH_GITHUB=no"
fi
log "готово"