Skip to content

Commit 7f7a866

Browse files
committed
style: apply shfmt
1 parent 1ce9e36 commit 7f7a866

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

netlify-build.sh

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ mkdir _site
1414

1515
# Prepare favicon
1616
curl -L https://github.com/typst-community/org/raw/main/design/typst-community.icon.png \
17-
-o _site/favicon.png
17+
-o _site/favicon.png
1818
cp _site/favicon.png public/favicon.png
1919

2020
# Prepare the index page
2121
REF=$(git rev-parse --short HEAD)
2222
DATE=$(git log --max-count=1 --pretty='%cd' --date=iso)
23-
cat << EOF > _site/index.html
23+
cat <<EOF >_site/index.html
2424
<!DOCTYPE html>
2525
<html lang="en">
2626
<head>
@@ -71,22 +71,22 @@ EOF
7171
# 3.1. Build en-US
7272

7373
build_en_US() {
74-
local VERSION="$1"
74+
local VERSION="$1"
7575

76-
BASE="en-US-$VERSION"
76+
BASE="en-US-$VERSION"
7777

78-
# Prepare docs.json
79-
curl -L https://github.com/typst-community/dev-builds/releases/download/docs-"$VERSION"/docs.json \
80-
-o public/docs.json
81-
sd '/DOCS-BASE/' "/$BASE/" public/docs.json
78+
# Prepare docs.json
79+
curl -L https://github.com/typst-community/dev-builds/releases/download/docs-"$VERSION"/docs.json \
80+
-o public/docs.json
81+
sd '/DOCS-BASE/' "/$BASE/" public/docs.json
8282

83-
# Prepare docs assets
84-
curl -LO https://github.com/typst-community/dev-builds/releases/download/docs-"$VERSION"/docs-assets.zip
85-
unzip docs-assets.zip && rm docs-assets.zip
86-
mv assets public/assets
83+
# Prepare docs assets
84+
curl -LO https://github.com/typst-community/dev-builds/releases/download/docs-"$VERSION"/docs-assets.zip
85+
unzip docs-assets.zip && rm docs-assets.zip
86+
mv assets public/assets
8787

88-
# Configure metadata
89-
cat << EOF > public/metadata.json
88+
# Configure metadata
89+
cat <<EOF >public/metadata.json
9090
{
9191
"\$schema": "../metadata.schema.json",
9292
"language": "en-US",
@@ -101,15 +101,15 @@ build_en_US() {
101101
"displayTranslationStatus": false
102102
}
103103
EOF
104-
# $DEPLOY_URL will be set by netlify. Fallback to example.com for local testing.
105-
# https://docs.netlify.com/build/configure-builds/environment-variables/#deploy-urls-and-metadata
104+
# $DEPLOY_URL will be set by netlify. Fallback to example.com for local testing.
105+
# https://docs.netlify.com/build/configure-builds/environment-variables/#deploy-urls-and-metadata
106106

107-
# Build
108-
mise exec -- bun run build
109-
mv dist _site/"$BASE"
107+
# Build
108+
mise exec -- bun run build
109+
mv dist _site/"$BASE"
110110

111-
# Clean
112-
rm -r public/{docs.json,assets,metadata.json}
111+
# Clean
112+
rm -r public/{docs.json,assets,metadata.json}
113113
}
114114

115115
build_en_US v0.14.0
@@ -121,9 +121,9 @@ build_en_US v0.13.1
121121
mise exec -- bun run fetch-docs-ja-jp
122122
sd '"/docs/' '"/ja-JP/' public/docs.json
123123
sd --fixed-strings \
124-
'"basePath": "/docs/",' \
125-
'"basePath": "/ja-JP/",' \
126-
public/metadata.json
124+
'"basePath": "/docs/",' \
125+
'"basePath": "/ja-JP/",' \
126+
public/metadata.json
127127

128128
# Prepare docs assets
129129
# At present, typst-jp do not translate comments within example code.

0 commit comments

Comments
 (0)