mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-06 03:38:39 +00:00
chore: don't include dist
in the release commit (#2385)
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
[](https://gitter.im/KaTeX/KaTeX?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[](https://dependabot.com)
|
||||
[](https://www.jsdelivr.com/package/npm/katex)
|
||||

|
||||

|
||||
[](https://gitpod.io/#https://github.com/KaTeX/KaTeX)
|
||||
|
||||
KaTeX is a fast, easy-to-use JavaScript library for TeX math rendering on the web.
|
||||
|
17
release.sh
17
release.sh
@@ -181,27 +181,20 @@ if [[ ! $PUBLISH ]]; then
|
||||
echo "After it gets merged, run './release.sh -p $VERSION'!"
|
||||
echo "Note that if KaTeX source code is changed after running this script,"
|
||||
echo "you have to run the release script again."
|
||||
else
|
||||
# Make a new detached HEAD
|
||||
git checkout --detach
|
||||
|
||||
git diff --stat --exit-code # check for uncommitted changes
|
||||
else
|
||||
# Edit package.json to the right version
|
||||
sed -i.bak -E 's|"version": "[^"]+",|"version": "'$VERSION'",|' package.json
|
||||
rm -f package.json.bak
|
||||
|
||||
# Build generated files and add them to the repository
|
||||
git clean -fdx dist
|
||||
# Build generated files
|
||||
yarn dist
|
||||
sed -i.bak -E '/^\/dist\/$/d' .gitignore
|
||||
rm -f .gitignore.bak
|
||||
|
||||
# Check Subresource Integrity hashes
|
||||
yarn node update-sri.js check README.md contrib/*/README.md
|
||||
|
||||
# Make the commit and tag, and push them.
|
||||
git add package.json .gitignore dist/
|
||||
git commit -n -m "v$VERSION"
|
||||
git diff --stat --exit-code # check for uncommitted changes
|
||||
# Make the tag and push
|
||||
git tag -a "v$VERSION" -m "v$VERSION"
|
||||
git push "$ORIGIN" "v$VERSION"
|
||||
|
||||
@@ -216,8 +209,6 @@ else
|
||||
echo "Don't forget to upload katex.tar.gz and katex.zip to the release!"
|
||||
fi
|
||||
|
||||
git diff --stat --exit-code # check for uncommitted changes
|
||||
|
||||
if [[ $DRY_RUN ]]; then
|
||||
echo ""
|
||||
echo "This was a dry run."
|
||||
|
@@ -9,10 +9,6 @@ const version = process.argv[2];
|
||||
Promise.all(process.argv.slice(3).map(file =>
|
||||
fs.readFile(file, "utf8")
|
||||
.then(body => {
|
||||
// Replace size badge url
|
||||
// eslint-disable-next-line max-len
|
||||
body = body.replace(/(https:\/\/img\.badgesize\.io\/KaTeX\/KaTeX\/v)(?:.+)(\/dist\/katex\.min\.js\?compression=gzip)/g, `$1${version}$2`);
|
||||
|
||||
// Replace CDN urls
|
||||
// 1 - url prefix: "http…/KaTeX/
|
||||
// 2 - opening quote: "
|
||||
|
Reference in New Issue
Block a user