- Rename proxmox/claude-agent/ to proxmox/lxc171-claude-agent/ - Move scripts to scripts/ subdirectory - Add complete installation guide for new LXC from scratch - Update proxmox/README.md with LXC 171 documentation and navigation - Add LXC 171 to containers table - Remove .serena/project.yml Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
105 lines
2.6 KiB
Bash
105 lines
2.6 KiB
Bash
#!/bin/bash
|
|
# Script all-in-one pentru workflow cu selecție proiect
|
|
|
|
WORKSPACE="/workspace"
|
|
source ~/.nvm/nvm.sh
|
|
|
|
echo "🚀 Claude Workflow"
|
|
echo "=================="
|
|
echo ""
|
|
|
|
# Listează proiectele (directoare cu .git)
|
|
echo "📁 Proiecte disponibile:"
|
|
echo ""
|
|
projects=()
|
|
i=1
|
|
for dir in "$WORKSPACE"/*/; do
|
|
if [ -d "$dir/.git" ]; then
|
|
name=$(basename "$dir")
|
|
projects+=("$dir")
|
|
echo " $i) $name"
|
|
((i++))
|
|
fi
|
|
done
|
|
|
|
if [ ${#projects[@]} -eq 0 ]; then
|
|
echo "❌ Nu am găsit proiecte Git în $WORKSPACE"
|
|
exit 1
|
|
fi
|
|
|
|
echo ""
|
|
read -p "Alege proiect [1-$((i-1))]: " proj_choice
|
|
|
|
if [ -z "$proj_choice" ] || [ "$proj_choice" -lt 1 ] || [ "$proj_choice" -gt ${#projects[@]} ]; then
|
|
echo "❌ Selecție invalidă"
|
|
exit 1
|
|
fi
|
|
|
|
PROJECT_DIR="${projects[$((proj_choice-1))]}"
|
|
PROJECT_NAME=$(basename "$PROJECT_DIR")
|
|
|
|
cd "$PROJECT_DIR" || exit 1
|
|
|
|
echo ""
|
|
echo "📂 Proiect: $PROJECT_NAME"
|
|
echo "🌿 Branch curent: $(git branch --show-current)"
|
|
echo ""
|
|
echo "Ce vrei să faci?"
|
|
echo " 1) Începe task nou (branch nou)"
|
|
echo " 2) Continuă task existent"
|
|
echo " 3) Finalizează task (commit + push)"
|
|
echo " 4) Vezi branch-uri"
|
|
echo " 5) Pornește Claude pe branch-ul curent"
|
|
echo ""
|
|
read -p "Alege [1-5]: " choice
|
|
|
|
case $choice in
|
|
1)
|
|
read -p "Nume branch (ex: fix/bug-login): " BRANCH_NAME
|
|
git checkout main 2>/dev/null || git checkout master
|
|
git pull
|
|
git checkout -b "$BRANCH_NAME"
|
|
echo "✅ Branch creat: $BRANCH_NAME"
|
|
echo "Pornesc Claude..."
|
|
claude
|
|
;;
|
|
2)
|
|
echo "Branch-uri locale:"
|
|
git branch
|
|
echo ""
|
|
read -p "Nume branch: " BRANCH_NAME
|
|
git checkout "$BRANCH_NAME"
|
|
echo "Pornesc Claude..."
|
|
claude
|
|
;;
|
|
3)
|
|
BRANCH=$(git branch --show-current)
|
|
if [ "$BRANCH" = "main" ] || [ "$BRANCH" = "master" ]; then
|
|
echo "❌ Ești pe $BRANCH! Nu face commit direct aici."
|
|
exit 1
|
|
fi
|
|
echo "📋 Status:"
|
|
git status --short
|
|
echo ""
|
|
read -p "Mesaj commit: " COMMIT_MSG
|
|
if [ -n "$COMMIT_MSG" ]; then
|
|
git add .
|
|
git commit -m "$COMMIT_MSG"
|
|
git push -u origin "$BRANCH"
|
|
echo "✅ Push făcut pe $BRANCH"
|
|
fi
|
|
;;
|
|
4)
|
|
echo "Branch curent: $(git branch --show-current)"
|
|
echo ""
|
|
git branch -a
|
|
;;
|
|
5)
|
|
echo "Pornesc Claude pe $(git branch --show-current)..."
|
|
claude
|
|
;;
|
|
*)
|
|
echo "Opțiune invalidă"
|
|
;;
|
|
esac
|