RobbieMcKinstry / punchcard

Removing Punchcard workflows from the DevOps Loop!
MIT License
0 stars 0 forks source link

Find Project Root #14

Open RobbieMcKinstry opened 1 year ago

RobbieMcKinstry commented 1 year ago

When the punchcard is executed, it must identify the project root. The "project root" is a pretty vague term in this context:

  1. Starting from pwd, look for a .git directory.
  2. If .git is found, this is the project directory.
  3. If not navigate to the parent directory. Repeat step 2.

This is complicated by Git submodules, and the presence (or absence) of a .punchcard configuration file or a .github directory (both of which may or may not exist, but could be more definitive than a .git directory because of submodules.

If no directory is found, return an Error (or a warning?).