Skip to content

Commit

Permalink
fix: use 2 spaces like the original scripts did
Browse files Browse the repository at this point in the history
Not sure why VS Code went with 4.
  • Loading branch information
TomasHubelbauer committed May 29, 2023
1 parent 87d0d17 commit 63eb8d2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
30 changes: 15 additions & 15 deletions bin/build-changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@

# Run `sed` in a way that's compatible with both macOS (BSD) and Linux (GNU)
sedi() {
if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i '' "$@"
else
sed -i "$@"
fi
if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i '' "$@"
else
sed -i "$@"
fi
}

cd docs
cp ../CHANGELOG.md source/tutorials/changelog.md
sedi \
-e 's/{%/{% raw %}{%{% endraw %}/g' \
-e 's/{{/{% raw %}{{{% endraw %}/g' \
-e '1 s/"/\"/g' \
-e '1 s/</\&lt;/g' \
-e '1 s/>/\&gt;/g' \
source/tutorials/changelog.md
-e 's/{%/{% raw %}{%{% endraw %}/g' \
-e 's/{{/{% raw %}{{{% endraw %}/g' \
-e '1 s/"/\&quot;/g' \
-e '1 s/</\&lt;/g' \
-e '1 s/>/\&gt;/g' \
source/tutorials/changelog.md
cp source/tutorials/changelog.md source/zh-cn/tutorials/changelog.md

if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i '' -e '1i\
sed -i '' -e '1i\
---\ntitle: Changelog\nauto: true\n---\n' source/tutorials/changelog.md
sed -i '' -e '1i\
sed -i '' -e '1i\
---\ntitle: 更新日志\nauto: true\n---\n' source/zh-cn/tutorials/changelog.md
else
sed -i '1i ---\ntitle: Changelog\nauto: true\n---\n' source/tutorials/changelog.md
sed -i '1i ---\ntitle: 更新日志\nauto: true\n---\n' source/zh-cn/tutorials/changelog.md
sed -i '1i ---\ntitle: Changelog\nauto: true\n---\n' source/tutorials/changelog.md
sed -i '1i ---\ntitle: 更新日志\nauto: true\n---\n' source/zh-cn/tutorials/changelog.md
fi
16 changes: 8 additions & 8 deletions bin/build-contributors.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

# Run `sed` in a way that's compatible with both macOS (BSD) and Linux (GNU)
sedi() {
if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i '' "$@"
else
sed -i "$@"
fi
if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i '' "$@"
else
sed -i "$@"
fi
}

cp .all-contributorsrc docs/.all-contributorsrc
sedi \
-e 's/README.md/docs\/themes\/navy\/layout\/partial\/all-contributors.swig/g' \
-e 's/"contributorsPerLine": 7/"contributorsPerLine": 65535/g' \
docs/.all-contributorsrc
-e 's/README.md/docs\/themes\/navy\/layout\/partial\/all-contributors.swig/g' \
-e 's/"contributorsPerLine": 7/"contributorsPerLine": 65535/g' \
docs/.all-contributorsrc

all-contributors --config docs/.all-contributorsrc generate
sedi 's/<br \/>.*<\/td>/<\/a><\/td>/g' docs/themes/navy/layout/partial/all-contributors.swig

0 comments on commit 63eb8d2

Please sign in to comment.