Skip to content

Commit

Permalink
Add logic to add a docs Makefile target
Browse files Browse the repository at this point in the history
This addition supports Makefile changes introduced to pulumi-docker
in pulumi/pulumi-docker#479.
  • Loading branch information
guineveresaenger committed Feb 3, 2023
1 parent b9051b3 commit dbb55cf
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion provider-ci/src/make-bridged-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,19 @@ export function bridgedProvider(config: BridgedConfig): Makefile {
WORKING_DIR,
} as const;


const docs: Target = {
name: "docs",
phony: true,
}

if (config.provider == "docker" ) {
console.log("this works")
docs.commands = [
"cd provider/pkg/docs-gen/examples/ && go run generate.go ./yaml ./"
]
}

const install_plugins: Target = {
name: "install_plugins",
phony: true,
Expand All @@ -43,10 +56,11 @@ export function bridgedProvider(config: BridgedConfig): Makefile {
) ?? []),
],
};

const tfgen: Target = {
name: "tfgen",
phony: true,
dependencies: [install_plugins],
dependencies: [install_plugins, docs],
commands: [
'(cd provider && go build -p 1 -o $(WORKING_DIR)/bin/$(TFGEN) -ldflags "-X $(PROJECT)/$(VERSION_PATH)=$(VERSION)" $(PROJECT)/$(PROVIDER_PATH)/cmd/$(TFGEN))',
"$(WORKING_DIR)/bin/$(TFGEN) schema --out provider/cmd/$(PROVIDER)",
Expand Down Expand Up @@ -275,6 +289,7 @@ export function bridgedProvider(config: BridgedConfig): Makefile {
install_nodejs_sdk,
install_sdks,
test,
docs,
],
};
}

0 comments on commit dbb55cf

Please sign in to comment.