Skip to content

Commit

Permalink
Add dependency version warnings to preversion.sh (#1862)
Browse files Browse the repository at this point in the history
Add warnings about outdated dependencies when building for release manually, to avoid #1861.
  • Loading branch information
tzrh authored and mroderick committed Jul 21, 2018
1 parent cb6c231 commit 691bf9d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions scripts/preversion.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
#!/bin/bash

for package in $(npm outdated --parseable nise lolex @sinonjs/formatio @sinonjs/samsam)
do
wanted="$(cut -d: -f2 <<< "$package")"
current="$(cut -d: -f3 <<< "$package")"
if [ "$wanted" != "$current" ]
then
echo "WARNING: Building with outdated package ${current}, run 'npm update' to install ${wanted}"
exit 1
fi
done

npm test

echo 'Updating History.md'
git changelog --no-merges
git add History.md
Expand Down

0 comments on commit 691bf9d

Please sign in to comment.