Update build scripts.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
CismonX 2021-10-02 01:30:37 +08:00
parent 84a5c506fe
commit 2fd2a025c3
Signed by: cismonx
GPG Key ID: 3094873E29A482FB
2 changed files with 6 additions and 3 deletions

View File

@ -14,7 +14,9 @@ vsce package --baseContentUrl=$(json -f package.json repository.url)/tree
unzip -d $VSIX_FILE_NAME{.d,}
cd $VSIX_FILE_NAME.d
MINIFY_XML_OPTIONS='--no-shorten-namespaces --no-remove-unused-namespaces --no-remove-unused-default-namespace'
MINIFY_XML_OPTIONS='--no-shorten-namespaces
--no-remove-unused-namespaces
--no-remove-unused-default-namespace'
minify-xml $MINIFY_XML_OPTIONS --output \[Content_Types\].xml{,}
minify-xml $MINIFY_XML_OPTIONS --output extension.vsixmanifest{,}
cd extension
@ -27,7 +29,8 @@ tail -n +9 README.md > _ && mv _ README.md
tail -n +9 CHANGELOG.md > _ && mv _ CHANGELOG.md
cd ext
# Minify Perl scripts.
if [ -x "$(command -v perltidy)" ]; then
# You can install perltidy with `cpan Perl::Tidy`
if [[ -x "$(command -v perltidy)" ]]; then
perltidy --mangle -dac -b html-preview.pm
rm html-preview.pm.bak
fi

View File

@ -10,7 +10,7 @@
SRC_PATH=./node_modules/language-texinfo
DEST_PATH=./out/grammars
mkdir -p $DEST_PATH
# Convert TextMate grammar from CSON to JSON, as VSCode cannot recognize CSON ones.
# Convert TextMate grammar to JSON, as VSCode cannot recognize CSON ones.
cson2json $SRC_PATH/grammars/texinfo.cson | json5 > $DEST_PATH/texinfo.json
VERSION=$(json -f package.json version)