Files
mattermost/server
59cd9d6282 Clone missing enterprise checkout in Cloud Agent install (#38117)
* Clone enterprise in Cloud Agent install when the multi-repo layout is missing.

Git-triggered automations only add mattermost/enterprise to the GitHub token scope; they do not check it out, so the install hook clones it when needed.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Reject bare Git repos when locating the enterprise checkout.

git rev-parse --is-inside-work-tree exits 0 for bare repositories while
printing false, so require a real work tree. Document the $HOME/enterprise
fallback in AGENTS.md.

Co-authored-by: mattermost-code <matty-code@mattermost.com>

* Honor config.override.mk during Enterprise detection and skip unusable sibling clone dests.

make evaluated BUILD_TAGS before reading the override, so a $HOME/enterprise fallback still shipped Team Edition; a bare ../enterprise also aborted install instead of falling back.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Match Enterprise branches in Cloud Agent clones

Prefer the corresponding Enterprise branch for PR-triggered environments while keeping clone publication safe and Cloud-only guidance scoped under .cursor.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Simplify Enterprise clone publication

Use an atomic no-clobber move instead of maintaining lock state in the ephemeral Cloud Agent environment.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: mattermost-code <matty-code@mattermost.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2026-09-09 17:20:12 -04:00
..
…
…