Skip to content

feat(deploy): read versions from origin/main by default - #10

Merged
cardoe merged 1 commit into
mainfrom
deploy-versions-origin-main
Nov 2, 2026
Merged

cardoe merged 1 commit into
mainfrom
deploy-versions-origin-main

Conversation

@cardoe

@cardoe cardoe commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Summary

understackctl deploy versions reported whatever was checked out locally, which is often a stale or feature branch. It now fetches origin main and reads each environment's deploy.yaml straight from the origin/main git tree, so the output reflects the latest main regardless of the current branch.

  • --local restores the previous working tree behavior.
  • --no-fetch skips the fetch and uses the last fetched origin/main (offline use). Mutually exclusive with --local.
  • If the fetch fails, the command errors and points at those two flags rather than showing stale data.

loadDeployConfig now delegates to a new parseDeployConfig that takes bytes, which the git path reuses.

Behavior change

The default source changes from the working tree to origin/main, and the default now requires network access to fetch. Flags and output format are unchanged.

Testing

  • Existing cmd/deploy tests pass.
  • Added TestDeployVersionsFromGitReadsOriginMain, which checks out a feature branch with a different ref and confirms the output reflects origin/main.

`deploy versions` reported whatever was checked out locally, which is
often a stale or feature branch. Fetch origin main and read each
environment's deploy.yaml straight from the git tree instead.

--local restores the old working tree behavior and --no-fetch reuses the
last fetched origin/main for offline use.
@cardoe
cardoe merged commit 1409217 into main Nov 2, 2026
8 checks passed
@cardoe
cardoe deleted the deploy-versions-origin-main branch November 2, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant