Skip to content

Commit

Permalink
Remove DocFX support from generate-assets.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
OoLunar committed Nov 7, 2023
1 parent 7334d64 commit 700b62a
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions tools/generate-assets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ regenerate()
# Optimize the SVG file
svgo --multipass --quiet "$1"

# Small size for DocFX
convert -background none -resize 48x48 "$1" "${1%.*}_small.png"

# Convert to PNG
convert -background none "$1" "${1%.*}.png"

Expand All @@ -37,18 +34,15 @@ for file in res/*.svg; do
regenerate "$file"
done

# Copy all resource files into the images directory
cp res/*.{svg,png,ico} docs/images/

# Uncomment the following lines if you want to automatically commit and push changes to Git
# Check if any files were modified
#git config --global user.email "github-actions[bot]@users.noreply.github.com"
#git config --global user.name "github-actions[bot]"
#git add res > /dev/null
#git diff-index --quiet HEAD
#if [ "$?" == "1" ]; then
# git commit -m "[ci-skip] Regenerate resource files." > /dev/null
# git push > /dev/null
#else
# echo "No resource files were modified."
#fi
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git add res > /dev/null
git diff-index --quiet HEAD
if [ "$?" == "1" ]; then
git commit -m "[ci-skip] Regenerate resource files." > /dev/null
git push > /dev/null
else
echo "No resource files were modified."
fi

0 comments on commit 700b62a

Please sign in to comment.