2020-04-24 23:36:52 +00:00
|
|
|
#!/usr/bin/env bash
|
2020-09-25 04:45:31 +00:00
|
|
|
# Bash 3 compatible for Darwin
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
# Version of Pulumi from
|
|
|
|
# https://www.pulumi.com/docs/get-started/install/versions/
|
2021-05-28 09:39:13 +00:00
|
|
|
VERSION="3.3.0"
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
# Grab latest release ${VERSION} from
|
|
|
|
# https://github.com/pulumi/pulumi-${NAME}/releases
|
2020-04-24 23:36:52 +00:00
|
|
|
plugins=(
|
2021-05-28 09:39:13 +00:00
|
|
|
"auth0=2.1.0"
|
|
|
|
"aws=4.5.1"
|
2021-05-03 20:48:10 +00:00
|
|
|
"cloudflare=3.0.0"
|
2021-05-28 09:39:13 +00:00
|
|
|
"consul=3.1.0"
|
|
|
|
"datadog=3.2.0"
|
|
|
|
"digitalocean=4.2.0"
|
2021-05-03 20:48:10 +00:00
|
|
|
"docker=3.0.0"
|
2021-05-28 09:39:13 +00:00
|
|
|
"equinix-metal=2.0.0"
|
|
|
|
"gcp=5.4.0"
|
|
|
|
"github=4.0.2"
|
2021-05-03 20:48:10 +00:00
|
|
|
"gitlab=4.0.0"
|
|
|
|
"hcloud=1.0.0"
|
2021-05-28 09:39:13 +00:00
|
|
|
"kubernetes=3.2.0"
|
|
|
|
"linode=3.1.0"
|
|
|
|
"mailgun=3.1.0"
|
2021-05-03 20:48:10 +00:00
|
|
|
"mysql=3.0.0"
|
2021-05-28 09:39:13 +00:00
|
|
|
"openstack=3.2.0"
|
2020-12-07 07:45:13 +00:00
|
|
|
"packet=3.2.2"
|
2021-05-28 09:39:13 +00:00
|
|
|
"postgresql=3.0.1"
|
|
|
|
"random=4.1.1"
|
|
|
|
"vault=4.1.0"
|
|
|
|
"vsphere=3.1.0"
|
2021-02-05 17:12:51 +00:00
|
|
|
)
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
function genMainSrc() {
|
|
|
|
local url="https://get.pulumi.com/releases/sdk/pulumi-v${VERSION}-$1-x64.tar.gz"
|
|
|
|
local sha256
|
|
|
|
sha256=$(nix-prefetch-url "$url")
|
|
|
|
echo " {"
|
|
|
|
echo " url = \"${url}\";"
|
|
|
|
echo " sha256 = \"$sha256\";"
|
|
|
|
echo " }"
|
|
|
|
}
|
|
|
|
|
|
|
|
function genSrcs() {
|
2020-07-18 16:06:22 +00:00
|
|
|
for plugVers in "${plugins[@]}"; do
|
|
|
|
local plug=${plugVers%=*}
|
|
|
|
local version=${plugVers#*=}
|
2020-04-24 23:36:52 +00:00
|
|
|
# url as defined here
|
|
|
|
# https://github.com/pulumi/pulumi/blob/06d4dde8898b2a0de2c3c7ff8e45f97495b89d82/pkg/workspace/plugins.go#L197
|
|
|
|
local url="https://api.pulumi.com/releases/plugins/pulumi-resource-${plug}-v${version}-$1-amd64.tar.gz"
|
|
|
|
local sha256
|
|
|
|
sha256=$(nix-prefetch-url "$url")
|
|
|
|
echo " {"
|
|
|
|
echo " url = \"${url}\";"
|
|
|
|
echo " sha256 = \"$sha256\";"
|
|
|
|
echo " }"
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
{
|
|
|
|
cat <<EOF
|
2020-04-24 23:36:52 +00:00
|
|
|
# DO NOT EDIT! This file is generated automatically by update.sh
|
|
|
|
{ }:
|
|
|
|
{
|
|
|
|
version = "${VERSION}";
|
|
|
|
pulumiPkgs = {
|
|
|
|
x86_64-linux = [
|
|
|
|
EOF
|
2021-03-09 03:18:52 +00:00
|
|
|
genMainSrc "linux"
|
|
|
|
genSrcs "linux"
|
|
|
|
echo " ];"
|
|
|
|
echo " x86_64-darwin = ["
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
genMainSrc "darwin"
|
|
|
|
genSrcs "darwin"
|
|
|
|
echo " ];"
|
|
|
|
echo " };"
|
|
|
|
echo "}"
|
|
|
|
} > data.nix
|