@reyemtech/pulumi-rackspace-spot 0.1.4 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Postinstall hook — symlinks the provider binary so Pulumi can find it on $PATH.
|
|
4
|
+
* Creates: /usr/local/bin/pulumi-resource-rackspace-spot -> this package's cmd/pulumi-resource-rackspace-spot.js
|
|
5
|
+
*/
|
|
6
|
+
const fs = require("fs");
|
|
7
|
+
const path = require("path");
|
|
8
|
+
|
|
9
|
+
const src = path.join(__dirname, "pulumi-resource-rackspace-spot.js");
|
|
10
|
+
const dest = "/usr/local/bin/pulumi-resource-rackspace-spot";
|
|
11
|
+
|
|
12
|
+
try {
|
|
13
|
+
if (fs.existsSync(dest)) fs.unlinkSync(dest);
|
|
14
|
+
fs.symlinkSync(src, dest);
|
|
15
|
+
console.log(`pulumi-rackspace-spot: linked provider to ${dest}`);
|
|
16
|
+
} catch (e) {
|
|
17
|
+
// Non-fatal — CI environments may not have /usr/local/bin write access
|
|
18
|
+
console.warn(`pulumi-rackspace-spot: could not link provider to ${dest} (${e.code}). Add ${path.dirname(src)} to PATH manually.`);
|
|
19
|
+
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reyemtech/pulumi-rackspace-spot",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Pulumi provider for Rackspace Spot — cloudspaces, node pools, kubeconfig",
|
|
5
5
|
"main": "bin/index.js",
|
|
6
6
|
"types": "bin/index.d.ts",
|
|
7
|
+
"bin": {
|
|
8
|
+
"pulumi-resource-rackspace-spot": "cmd/pulumi-resource-rackspace-spot.js"
|
|
9
|
+
},
|
|
7
10
|
"scripts": {
|
|
8
|
-
"build": "tsc"
|
|
11
|
+
"build": "tsc && cp -r ../provider/bin cmd/provider",
|
|
12
|
+
"postinstall": "node cmd/install-plugin.js"
|
|
9
13
|
},
|
|
10
14
|
"pulumi": {
|
|
11
15
|
"resource": true,
|