vscode-omega
aien-dev/vscode-omega
Brought by drakestapleton
vscode-omega / test / check-vsix.sh
| 1 | #!/bin/sh |
| 2 | # Usage: test/check-vsix.sh <file.vsix>. Exit 0 when the package holds everything the extension needs |
| 3 | # and none of the tests, CI files or node_modules; 1 otherwise. |
| 4 | set -eu |
| 5 | v=${1:?usage: check-vsix.sh <file.vsix>} |
| 6 | list=$(unzip -Z1 "$v") |
| 7 | rc=0 |
| 8 | for f in extension/package.json extension/extension.js extension/omc.js extension/syntaxes/omega.tmLanguage.json \ |
| 9 | extension/language-configuration.json extension/snippets/omega.json extension/LICENSE.txt extension/NOTICE; do |
| 10 | printf '%s\n' "$list" | grep -qx "$f" || { echo "check-vsix: missing $f"; rc=1; } |
| 11 | done |
| 12 | bad=$(printf '%s\n' "$list" | grep -E '^extension/(test/|node_modules/|\.github/|\.crumb$|\.goals\.json$)' || true) |
| 13 | [ -z "$bad" ] || { echo "check-vsix: shipped files that belong to the repo only:"; printf '%s\n' "$bad"; rc=1; } |
| 14 | [ "$rc" = 0 ] && echo "check-vsix: ok $v" |
| 15 | exit "$rc" |