interplane.Get Omega
Read in your language

vscode-omega

aien-dev/vscode-omega

Brought by drakestapleton

branch main Branches Tags History

vscode-omega / test / check-vsix.sh

15 lines · 859 bytes Raw Blame History
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.
4set -eu
5v=${1:?usage: check-vsix.sh <file.vsix>}
6list=$(unzip -Z1 "$v")
7rc=0
8for 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; }
11done
12bad=$(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"
15exit "$rc"