Merge pull request #22 from matthewbauer/version-check

Check that version is actually newer via compareVersions
This commit is contained in:
Ryan Mulligan 2018-03-19 10:42:42 -07:00 committed by GitHub
commit d425c5cfc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

5
up.sh
View File

@ -23,6 +23,11 @@ function error_exit {
exit 1 exit 1
} }
if ! [ $(nix-instantiate --eval -E "builtins.compareVersions '$NEW_VERSION' '$OLD_VERSION'") -eq 1 ];
then
error_exit "$NEW_VERSION is not newer than $OLD_VERSION according to Nix"
fi
# Package blacklist # Package blacklist
case "$PACKAGE_NAME" in case "$PACKAGE_NAME" in
*jquery*) error_exit "this isn't a real package";; *jquery*) error_exit "this isn't a real package";;