Skip to content

Commit d0a6465

Browse files
committed
use .campaign.g.md suffix
1 parent 25e2c0d commit d0a6465

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

docs/src/content/docs/guides/campaigns.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,8 @@ gh aw compile
295295

296296
When specs are valid:
297297

298-
- Each `<name>.campaign.md` generates an orchestrator markdown workflow named `<name>-campaign.md` next to the spec.
299-
- The orchestrator is compiled like any other workflow to `<name>-campaign.lock.yml`.
298+
- Each `<name>.campaign.md` generates an orchestrator markdown workflow named `<name>.campaign.g.md` next to the spec.
299+
- The orchestrator is compiled like any other workflow to `<name>.campaign.g.lock.yml`.
300300
- This makes campaigns first-class, compilable entry points while keeping specs declarative.
301301
- Orchestrators are only generated when the campaign spec has meaningful details (tracker labels, workflows, memory paths, or metrics glob).
302302

pkg/campaign/orchestrator.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ import (
1313
// determines the emitted .lock.yml name.
1414
func BuildOrchestrator(spec *CampaignSpec, campaignFilePath string) (*workflow.WorkflowData, string) {
1515
// Derive orchestrator markdown path alongside the campaign spec, using a
16-
// distinct suffix to avoid colliding with existing workflows.
16+
// distinct suffix to avoid colliding with existing workflows. We use
17+
// a `.campaign.g.md` suffix to make it clear that the file is generated
18+
// from the corresponding `.campaign.md` spec.
1719
base := strings.TrimSuffix(campaignFilePath, ".campaign.md")
18-
orchestratorPath := base + "-campaign.md"
20+
orchestratorPath := base + ".campaign.g.md"
1921

2022
name := spec.Name
2123
if strings.TrimSpace(name) == "" {

pkg/campaign/orchestrator_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func TestBuildOrchestrator_BasicShape(t *testing.T) {
1919
mdPath := ".github/workflows/security-compliance.campaign.md"
2020
data, orchestratorPath := BuildOrchestrator(spec, mdPath)
2121

22-
if orchestratorPath != ".github/workflows/security-compliance-campaign.md" {
22+
if orchestratorPath != ".github/workflows/security-compliance.campaign.g.md" {
2323
t.Fatalf("unexpected orchestrator path: got %q", orchestratorPath)
2424
}
2525

0 commit comments

Comments
 (0)