Skip to content

publish.sh uses Bash 4-only ${ENGINE^}, breaking macOS Bash 3.2 #37

Description

@Matrixbirds

Title: publish.sh fails on macOS Bash 3.2 with bad substitution

What

publish.sh fails on macOS when publishing a Godot/Codex game repo because it uses Bash 4 parameter expansion syntax:

${ENGINE^}

macOS ships /bin/bash 3.2 by default, which does not support this syntax.

Why

This blocks the documented getting-started flow on macOS:

./publish.sh --engine godot --agent codex --out ~/my-godot-game

Observed error:

./publish.sh: line 148: ENGINE_NAME=${ENGINE^}: bad substitution

This affects the autonomous pipeline because users cannot publish the generated Godot runtime repo from the source repo on a default macOS environment.

Reproduction steps

  1. Clone the repo on macOS.
  2. Enter the repo:
cd /Users/young/Github/godogen
  1. Run:
./publish.sh --engine godot --agent codex --out ~/my-godot-game
  1. Observe the failure:
./publish.sh: line 148: ENGINE_NAME=${ENGINE^}: bad substitution

Environment

OS: macOS 26.3.1
Build: 25D2128
Kernel: Darwin 25.3.0 arm64
Shell executing script: /bin/bash
Bash version: GNU bash 3.2.57(1)-release
Python: Python 3.9.6
Repo commit tested: 51954f9f34d18044c501a09c0645ff0e680edbdf

Why not something simpler?

The simplest fix is to avoid Bash 4-only syntax and use an explicit mapping after engine validation:

case "$ENGINE" in
    godot) ENGINE_NAME="Godot" ;;
    bevy) ENGINE_NAME="Bevy" ;;
    babylon) ENGINE_NAME="Babylon" ;;
esac

Then replace:

ENGINE_NAME=${ENGINE^}

with:

ENGINE_NAME=$ENGINE_NAME

This keeps the script compatible with macOS default Bash without requiring users to install or invoke a newer Bash.

Additional context

After applying the mapping locally, this command completed successfully:

./publish.sh --engine godot --agent codex --out /tmp/godogen-smoke-godot --force

Output:

Publishing godot/codex to: /tmp/godogen-smoke-godot
Created AGENTS.md
Created .gitignore
Done. skills: 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions