Skip to content
This repository was archived by the owner on Mar 11, 2023. It is now read-only.

Commit 5e77886

Browse files
committed
Correct plugin auto-installation from custom server
1 parent edd4280 commit 5e77886

File tree

4 files changed

+13
-2112
lines changed

4 files changed

+13
-2112
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ sdk
33
__pycache__
44
venv
55
node_modules
6+
package-lock.json

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ sdk: bin/pulumi-sdkgen-docker-buildkit
1212
cd sdk/nodejs/ && \
1313
npm install && \
1414
npm run build && \
15-
sed -e "s/\$${VERSION}/$(VERSION)/g" package.json > bin/package.json
15+
awk -f ../../build/munge-package-json.awk -v version=$(VERSION) package.json > bin/package.json
1616
mv sdk/nodejs sdk/nodejs.tmp
1717
mv sdk/nodejs.tmp/bin sdk/nodejs
1818
rm -r sdk/nodejs.tmp

build/munge-package-json.awk

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/"pulumi"/ {
2+
print;
3+
print " \"name\": \"docker-buildkit\",";
4+
next;
5+
}
6+
7+
{
8+
gsub("\\${VERSION}", version);
9+
gsub("pluginDownloadURL", "server");
10+
print;
11+
}

0 commit comments

Comments
 (0)