File: verifyCleanLockfile.sh

package info (click to toggle)
node-blueprintjs 4.17.8~git20230417213433.6dab069%2Bds1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 85,560 kB
  • sloc: javascript: 14,111; sh: 433; makefile: 25
file content (19 lines) | stat: -rwxr-xr-x 509 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env bash

# Verifies that yarn.lock is in its cleanest possible state

set -e
set -o pipefail

scripts_dir="$( dirname "$(readlink -f "$0")" )"
bin="$scripts_dir/../node_modules/.bin"
duplicates="$("$bin/yarn-deduplicate" "$scripts_dir/../yarn.lock" --strategy fewer --list)"

if [[ $duplicates ]]; then
    echo "Found duplicate blocks in yarn.lock which can be cleaned up. Please run 'yarn-deduplicate yarn.lock --strategy fewer'"
    echo ""
    echo "$duplicates"
    exit 1
else
    exit 0
fi