-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathnetlify.toml
More file actions
29 lines (27 loc) · 1.27 KB
/
Copy pathnetlify.toml
File metadata and controls
29 lines (27 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
[[integrations]]
name = "snooty-cache-plugin"
[build]
publish = "dist"
command = """
set -eu
if [ -n "${NPM_AWS_KEY:-}" ]; then
export AWS_ACCESS_KEY_ID="$NPM_AWS_KEY"
export AWS_SECRET_ACCESS_KEY="$NPM_AWS_SECRET"
export AWS_DEFAULT_REGION=us-east-1
AUTH_DIR=$(mktemp -d)
npm install --prefix "$AUTH_DIR" --silent @aws-sdk/client-codeartifact@3
NPM_AWS_AUTH="$(NODE_PATH="$AUTH_DIR/node_modules" node -e 'const { CodeartifactClient, GetAuthorizationTokenCommand } = require("@aws-sdk/client-codeartifact"); (async () => { const client = new CodeartifactClient({ region: "us-east-1" }); const out = await client.send(new GetAuthorizationTokenCommand({ domain: "mongodb", domainOwner: "271346171620" })); if (!out.authorizationToken) throw new Error("empty CodeArtifact token"); process.stdout.write(out.authorizationToken); })().catch((e) => { console.error(e); process.exit(1); });')"
export NPM_AWS_AUTH
rm -rf "$AUTH_DIR"
[ -n "$NPM_AWS_AUTH" ] || { echo "CodeArtifact token fetch returned empty"; exit 1; }
echo "NPM_AWS_AUTH length=${#NPM_AWS_AUTH}"
fi
npm install --legacy-peer-deps
. ./build.sh $REPO_NAME $PARSER_VERSION
"""
[build.environment]
ORG_NAME = "10gen"
REPO_NAME = "docs-ops-manager"
BRANCH_NAME = "main"
SITE_NAME = "ops-manager"
PARSER_VERSION = "v0.20.18"