Skip to content

Commit

Permalink
fix: tweak make file to use proper version format
Browse files Browse the repository at this point in the history
  • Loading branch information
Ignacio Anaya committed Jun 14, 2022
1 parent 15c1ab2 commit 844521b
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 9 deletions.
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,15 @@ provider:: tfgen install_plugins # build the provider binary

build_sdks:: install_plugins provider build_nodejs_sdk build_python build_go build_dotnet # build all the sdks

build_nodejs_sdk:: VERSION := $(shell pulumictl get version --language javascript --omit-commit-hash)
build_nodejs_sdk:: VERSION := $(shell pulumictl get version --omit-commit-hash)
build_nodejs_sdk:: install_plugins tfgen # build the node sdk
$(WORKING_DIR)/bin/$(TFGEN) nodejs --overlays provider/overlays/nodejs --out sdk/nodejs/
cd sdk/nodejs/ && \
yarn install && \
yarn run tsc && \
cp -R scripts/ bin && \
cp ../../README.md ../../LICENSE package.json yarn.lock ./bin/ && \
sed -i.bak -e "s/\$${VERSION}/$(VERSION)/g" ./bin/package.json && \
jq '.main = "./bin/index.js"' ./bin/package.json > tmp.$$.json && mv tmp.$$.json ./bin/package.json && \
jq '.types = "./bin/index.d.ts"' ./bin/package.json > tmp.$$.json && mv tmp.$$.json ./bin/package.json
sed -i.bak -e "s/\$${VERSION}/$(VERSION)/g" ./bin/package.json

build_python:: PYPI_VERSION := $(shell pulumictl get version --language python --omit-commit-hash)
build_python:: install_plugins tfgen # build the python sdk
Expand Down
2 changes: 1 addition & 1 deletion provider/cmd/pulumi-resource-checkly/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"attribution": "This Pulumi package is based on the [`checkly` Terraform Provider](https://github.com/checkly/terraform-provider-checkly).",
"repository": "https://github.com/checkly/pulumi-checkly",
"logoUrl": "https://raw.githubusercontent.com/checkly/pulumi-checkly/main/assets/checkly.svg",
"pluginDownloadURL": "https://github.com/checkly/pulumi-checkly/releases/download/${VERSION}",
"pluginDownloadURL": "https://github.com/checkly/pulumi-checkly/releases/download/v${VERSION}",
"publisher": "checkly",
"meta": {
"moduleFormat": "(.*)(?:/[^/]*)"
Expand Down
2 changes: 1 addition & 1 deletion provider/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func Provider() tfbridge.ProviderInfo {
Publisher: "checkly",
LogoURL: "https://raw.githubusercontent.com/checkly/pulumi-checkly/main/assets/checkly.svg",
Description: "A Pulumi package for creating and managing Checkly monitoring resources.",
PluginDownloadURL: "https://github.com/checkly/pulumi-checkly/releases/download/${VERSION}",
PluginDownloadURL: "https://github.com/checkly/pulumi-checkly/releases/download/v${VERSION}",
Keywords: []string{"pulumi", "checkly", "category/monitoring"},
License: "MIT",
Homepage: "https://www.pulumi.com/registry/packages/checkly",
Expand Down
2 changes: 1 addition & 1 deletion sdk/nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
},
"pulumi": {
"resource": true,
"pluginDownloadURL": "https://github.com/checkly/pulumi-checkly/releases/download/${VERSION}"
"pluginDownloadURL": "https://github.com/checkly/pulumi-checkly/releases/download/v${VERSION}"
}
}
2 changes: 1 addition & 1 deletion sdk/nodejs/scripts/install-pulumi-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if (args.indexOf("${VERSION}") !== -1) {
process.exit(0);
}

var res = childProcess.spawnSync("pulumi", ["plugin", "install", "--server", "https://github.com/checkly/pulumi-checkly/releases/download/${VERSION}"].concat(args), {
var res = childProcess.spawnSync("pulumi", ["plugin", "install", "--server", "https://github.com/checkly/pulumi-checkly/releases/download/v${VERSION}"].concat(args), {
stdio: ["ignore", "inherit", "inherit"]
});

Expand Down
2 changes: 1 addition & 1 deletion sdk/nodejs/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ export function getVersion(): string {

/** @internal */
export function resourceOptsDefaults(): any {
return { version: getVersion(), pluginDownloadURL: "https://github.com/checkly/pulumi-checkly/releases/download/${VERSION}" };
return { version: getVersion(), pluginDownloadURL: "https://github.com/checkly/pulumi-checkly/releases/download/v${VERSION}" };
}

0 comments on commit 844521b

Please sign in to comment.