mirror of
https://github.com/primer/css.git
synced 2024-12-18 19:51:37 +03:00
24 lines
710 B
Bash
Executable File
24 lines
710 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
# reads the tag either from $NPM_TAG or first positional arg:
|
|
# script/compare-published [tag]
|
|
tag=${1:-${NPM_TAG:-latest}}
|
|
|
|
# this is way faster than `lerna exec npm info . .name`
|
|
# (but will skip modules that don't have "primer-" in them)
|
|
modules=`ls -1 modules | egrep primer-`
|
|
|
|
# tabular output separator for column(1)
|
|
s=,
|
|
|
|
echo "📦 Comparing Primer modules published @${tag}..."
|
|
(
|
|
echo "module${s}tag${s}published${s}local"
|
|
for module in $modules; do
|
|
v_published=`npm info ${module}@${tag} .version`
|
|
v_local=`jq -Mr .version modules/${module}/package.json`
|
|
echo "${module}${s}${tag}${s}${v_published:-x}${s}${v_local}"
|
|
done
|
|
) | column -t -s=${s}
|