make-todo-episode06-demo.sh
bash
sha256:5472be4fece32b606c308fad9d57295ce327955fb2b87b8beec6ea1626050473
Add published YouTube URL to Episode 00
Sonnet 5
4 hours ago
| 1 | #!/usr/bin/env bash |
| 2 | set -euo pipefail |
| 3 | |
| 4 | # The todo domain (muse/plugins/todo) ships on muse's dev branch as of this |
| 5 | # recording but hasn't gone out in a released muse tarball yet -- this demo |
| 6 | # uses muse-dev (the editable install of ~/ecosystem/muse) rather than plain |
| 7 | # muse. Swap MUSE_BIN to "muse" once a release includes it. |
| 8 | MUSE_BIN="${MUSE_BIN:-muse-dev}" |
| 9 | DEMO_DIR="${1:-todo-episode06}" |
| 10 | |
| 11 | command -v "$MUSE_BIN" >/dev/null 2>&1 || { echo "error: $MUSE_BIN not found on PATH" >&2; exit 1; } |
| 12 | |
| 13 | rm -rf "$DEMO_DIR" |
| 14 | mkdir -p "$DEMO_DIR" |
| 15 | cd "$DEMO_DIR" |
| 16 | |
| 17 | "$MUSE_BIN" init --domain todo |
| 18 | |
| 19 | echo "Write episode 06 script" > todo.txt |
| 20 | "$MUSE_BIN" commit -m "Add first task" |
| 21 | |
| 22 | "$MUSE_BIN" checkout -b feature/alice |
| 23 | echo "Buy milk" >> todo.txt |
| 24 | "$MUSE_BIN" commit -m "Alice adds a task" |
| 25 | |
| 26 | "$MUSE_BIN" checkout main |
| 27 | "$MUSE_BIN" checkout -b feature/bob |
| 28 | echo "Fix the bug" >> todo.txt |
| 29 | "$MUSE_BIN" commit -m "Bob adds a different task" |
| 30 | |
| 31 | "$MUSE_BIN" checkout main |
| 32 | "$MUSE_BIN" merge feature/alice |
| 33 | "$MUSE_BIN" merge feature/bob |
| 34 | |
| 35 | echo |
| 36 | echo "Ready in: $(pwd)" |
| 37 | echo "todo.txt now has all three tasks, merged with zero conflicts:" |
| 38 | cat todo.txt |
File History
1 commit
sha256:5472be4fece32b606c308fad9d57295ce327955fb2b87b8beec6ea1626050473
Add published YouTube URL to Episode 00
Sonnet 5
4 hours ago