Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ cerebro-env: ## Print env exports for running this Maestro checkout against loca
@LOCAL_CEREBRO_REPO="$(LOCAL_CEREBRO_REPO)" node scripts/check-cerebro-e2e.mjs --print-maestro-env

cerebro-dev: cerebro-e2e-doctor ## Start a usable local Cerebro stack with Maestro event ingestion enabled
@eval "$$(LOCAL_CEREBRO_REPO="$(LOCAL_CEREBRO_REPO)" node scripts/check-cerebro-e2e.mjs --print-env)" && \
@env_exports="$$(LOCAL_CEREBRO_REPO="$(LOCAL_CEREBRO_REPO)" node scripts/check-cerebro-e2e.mjs --print-env)" && \
eval "$$env_exports" && \
LOCAL_MAESTRO_REPO="$(CURDIR)" \
LOCAL_HTTP_PORT="$$LOCAL_HTTP_PORT" \
LOCAL_ADDR="$$LOCAL_ADDR" \
Expand All @@ -130,7 +131,8 @@ cerebro-dev: cerebro-e2e-doctor ## Start a usable local Cerebro stack with Maest
$(MAKE) -C "$(LOCAL_CEREBRO_REPO)" local-maestro-dev

cerebro-e2e: cerebro-e2e-doctor ## Run the cross-repo Cerebro local E2E using this Maestro checkout
@eval "$$(LOCAL_CEREBRO_REPO="$(LOCAL_CEREBRO_REPO)" node scripts/check-cerebro-e2e.mjs --print-env)" && \
@env_exports="$$(LOCAL_CEREBRO_REPO="$(LOCAL_CEREBRO_REPO)" node scripts/check-cerebro-e2e.mjs --print-env)" && \
eval "$$env_exports" && \
LOCAL_MAESTRO_REPO="$(CURDIR)" \
LOCAL_HTTP_PORT="$$LOCAL_HTTP_PORT" \
LOCAL_ADDR="$$LOCAL_ADDR" \
Expand Down
2 changes: 1 addition & 1 deletion scripts/prepare-public-release-mirror.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ function createMatcher(patterns) {
return (relativePath) => {
const normalized = normalizePath(relativePath).replace(/^\.?\//u, "");
if (!normalized) return false;
if (PUBLIC_INCLUDE_OVERRIDES.has(normalized)) return false;
if (exact.has(normalized)) return true;
if (PUBLIC_INCLUDE_OVERRIDES.has(normalized)) return false;
if (
prefixes.some(
(prefix) => normalized === prefix || normalized.startsWith(`${prefix}/`),
Expand Down
2 changes: 2 additions & 0 deletions test/scripts/cerebro-e2e-config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ describe("Cerebro local E2E config", () => {
const makefile = readFileSync(resolve(root, "Makefile"), "utf8");

expect(makefile).toContain("scripts/check-cerebro-e2e.mjs --print-env");
expect(makefile).toContain('env_exports="$$(LOCAL_CEREBRO_REPO=');
expect(makefile).toContain('eval "$$env_exports" &&');
expect(makefile).toContain(
"scripts/check-cerebro-e2e.mjs --print-maestro-env",
);
Expand Down
41 changes: 41 additions & 0 deletions test/scripts/prepare-public-release-mirror.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,47 @@ describe("prepare-public-release-mirror", () => {
expect(existsSync(join(target, "public-mirror"))).toBe(false);
});

it("lets explicit excludes remove public include override files", () => {
const { source, target } = makeFixture();
write(
join(source, "package.json"),
JSON.stringify(
{
name: internalPackageName,
version: "1.2.3",
maestro: {
canonicalPackageName: publicPackageName,
},
},
null,
2,
),
);
write(join(source, "README.md"), "public readme\n");
write(join(source, ".env.example"), "INTERNAL_DEFAULT=value\n");
write(
join(source, ".github/public-release-mirror.exclude"),
".env.example\n",
);

execFileSync(
process.execPath,
[
"scripts/prepare-public-release-mirror.mjs",
"--source",
source,
"--target",
target,
],
{ cwd: process.cwd(), stdio: "pipe" },
);

expect(readFileSync(join(target, "README.md"), "utf8")).toBe(
"public readme\n",
);
expect(existsSync(join(target, ".env.example"))).toBe(false);
});

it("excludes docs/release-ops.md from the default fallback excludes", () => {
const { source, target, root } = makeFixture();
write(
Expand Down
Loading