Skip to content

Commit 66c6ec2

Browse files
Rename build scripts and add scripts for Vercel and Cloudflare (#16161)
1 parent 40ea20e commit 66c6ec2

File tree

7 files changed

+125
-1
lines changed

7 files changed

+125
-1
lines changed

_config_base.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ defaults:
1414
layout: page
1515
exclude:
1616
- __tests__
17-
- netlify
17+
- build
1818
- scripts
1919
- vendor
2020
- jekyll-algolia-dev

build/build-cloudflare.sh

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#!/bin/bash
2+
3+
# Populate the site_url to be used by jekyll for generating sidebar and search links
4+
site_url="${DEPLOY_PRIME_URL}"
5+
JEKYLL_ENV="preview"
6+
if [[ "$CONTEXT" = "production" ]]; then
7+
site_url="https://www.cockroachlabs.com"
8+
JEKYLL_ENV="production"
9+
fi;
10+
11+
echo "url: ${site_url}" > _config_url.yml
12+
13+
function build {
14+
bundle exec jekyll build --trace --config _config_base.yml,$1
15+
if [[ $? != 0 ]]; then
16+
exit 1
17+
fi;
18+
}
19+
20+
# Transform API spec for API docs generation
21+
pushd api/
22+
npx swagger2openapi api-spec.json > spec_30.json
23+
npx snippet-enricher-cli --targets="shell_curl" --input=spec_30.json > spec_30_enriched.json
24+
rm spec_30.json
25+
popd
26+
27+
gem install bundler --silent
28+
bundle install --quiet
29+
build _config_cockroachdb.yml,_config_url.yml
30+
31+
cp _site/docs/_redirects _site/_redirects
32+
cp _site/docs/404.html _site/404.html
33+
34+
# Set up htmltest
35+
36+
curl -s https://htmltest.wjdp.uk | bash
37+
if [[ $? != 0 ]]; then
38+
echo "Failed to install htmltest"
39+
exit 1
40+
fi;
41+
./bin/build.sh>/dev/null 2>&1
42+
43+
# Run htmltest to check external links on scheduled nightly runs
44+
# (see .github/workflows/nightly.yml)
45+
46+
if [[ "$INCOMING_HOOK_TITLE" = "nightly" ]]; then
47+
./bin/htmltest
48+
if [[ $? != 0 ]]; then
49+
exit 1
50+
fi;
51+
fi;
52+
53+
# Run htmltest, but skip checking external links to speed things up
54+
./bin/htmltest --skip-external
55+
if [[ $? != 0 ]]; then
56+
exit 1
57+
fi;
58+
59+
# Run tests defined in __tests__
60+
./node_modules/.bin/jest
61+
exit $?
File renamed without changes.

build/build-vercel.sh

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#!/bin/bash
2+
3+
# Populate the site_url to be used by jekyll for generating sidebar and search links
4+
site_url="${DEPLOY_PRIME_URL}"
5+
JEKYLL_ENV="preview"
6+
if [[ "$CONTEXT" = "production" ]]; then
7+
site_url="https://www.cockroachlabs.com"
8+
JEKYLL_ENV="production"
9+
fi;
10+
11+
echo "url: ${site_url}" > _config_url.yml
12+
13+
function build {
14+
bundle exec jekyll build --trace --config _config_base.yml,$1
15+
if [[ $? != 0 ]]; then
16+
exit 1
17+
fi;
18+
}
19+
20+
# Transform API spec for API docs generation
21+
pushd api/
22+
npx swagger2openapi api-spec.json > spec_30.json
23+
npx snippet-enricher-cli --targets="shell_curl" --input=spec_30.json > spec_30_enriched.json
24+
rm spec_30.json
25+
popd
26+
27+
gem install bundler --silent
28+
bundle install --quiet
29+
build _config_cockroachdb.yml,_config_url.yml
30+
31+
cp _site/docs/_redirects _site/_redirects
32+
cp _site/docs/404.html _site/404.html
33+
34+
# Set up htmltest
35+
36+
curl -s https://htmltest.wjdp.uk | bash
37+
if [[ $? != 0 ]]; then
38+
echo "Failed to install htmltest"
39+
exit 1
40+
fi;
41+
./bin/build.sh>/dev/null 2>&1
42+
43+
# Run htmltest to check external links on scheduled nightly runs
44+
# (see .github/workflows/nightly.yml)
45+
46+
if [[ "$INCOMING_HOOK_TITLE" = "nightly" ]]; then
47+
./bin/htmltest
48+
if [[ $? != 0 ]]; then
49+
exit 1
50+
fi;
51+
fi;
52+
53+
# Run htmltest, but skip checking external links to speed things up
54+
./bin/htmltest --skip-external
55+
if [[ $? != 0 ]]; then
56+
exit 1
57+
fi;
58+
59+
# Run tests defined in __tests__
60+
./node_modules/.bin/jest
61+
exit $?
File renamed without changes.
File renamed without changes.

v22.2/alter-table.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ toc: true
55
docs_area: reference.sql
66
---
77

8+
<a id="experimental_audit"></a>
9+
810
The `ALTER TABLE` [statement](sql-statements.html) changes the definition of a table. For information on using `ALTER TABLE`, see the pages for its [subcommands](#subcommands).
911

1012
{% include {{ page.version.version }}/misc/schema-change-stmt-note.md %}

0 commit comments

Comments
 (0)