Compare commits
2
Commits
f044c5f354
..
devel
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3e2791269d | ||
|
|
daa0031ca0 |
+13
-6
@@ -1,6 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
CWD="$PWD"
|
CWD="$PWD"
|
||||||
|
EDITOR="code"
|
||||||
TICKETS=()
|
TICKETS=()
|
||||||
|
|
||||||
function ticketloop(){
|
function ticketloop(){
|
||||||
@@ -29,22 +30,24 @@ function doaction {
|
|||||||
branch="godb_$label_$ticket"
|
branch="godb_$label_$ticket"
|
||||||
dir="../godb_$ticket"
|
dir="../godb_$ticket"
|
||||||
|
|
||||||
echo "----------------------------------------"
|
echo "-----------------------------------------------"
|
||||||
echo "Creating workspace with the following details: "
|
echo "Creating workspace with the following details: "
|
||||||
echo "Ticket Type : $label"
|
echo "Ticket Type : $label"
|
||||||
echo "Ticket Id : $ticket"
|
echo "Ticket Id : $ticket"
|
||||||
echo "Ticket branch: $branch"
|
echo "Ticket branch: $branch"
|
||||||
echo "Worktree dir : $dir"
|
echo "Worktree dir : $dir"
|
||||||
echo "Branch from : $from"
|
echo "Branch from : $from"
|
||||||
echo "Prompt : $prompt"
|
echo "Prompt : $prompt"
|
||||||
echo "----------------------------------------"
|
echo "-----------------------------------------------"
|
||||||
git checkout "$from"
|
git checkout "$from"
|
||||||
git pull origin "$from"
|
git pull origin "$from"
|
||||||
git worktree add "$dir" -b "$branch"
|
git worktree add "$dir" -b "$branch"
|
||||||
cd "$dir"
|
cd "$dir"
|
||||||
code .
|
"$EDITOR" . &
|
||||||
sleep 1.5
|
sleep 1.5
|
||||||
code chat "$prompt"
|
if [[ -n "$prompt" && "$EDITOR" == "code" ]]; then
|
||||||
|
code chat "$prompt"
|
||||||
|
fi
|
||||||
cd "$CWD"
|
cd "$CWD"
|
||||||
git worktree list
|
git worktree list
|
||||||
}
|
}
|
||||||
@@ -58,11 +61,15 @@ while [[ "$#" -gt 0 ]]; do
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
"--cwd"|"--dir")
|
"--cwd"|"-c")
|
||||||
CWD="$2"
|
CWD="$2"
|
||||||
cd "$2"
|
cd "$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
|
"--edr"|"-e")
|
||||||
|
EDITOR="$2"
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "unknown argument $1"
|
echo "unknown argument $1"
|
||||||
exit -1
|
exit -1
|
||||||
|
|||||||
Reference in new issue
Block a user