#!/usr/bin/env bash # # - prevent frozen code from being checked in # - guard against lint errors ## set -e changed=($(git diff-index --cached --name-only HEAD)) for ns in ${changed[@]} do version=$(${CODEROOT:?}/Biz/Ide/version $ns) if [[ $version -eq -1 ]]; then echo "info: version: $ns: deleted" elif [[ $version -lt 1 ]]; then echo "fail: version: $ns: $version" exit 1 else echo "info: version: $ns: $version" fi done lint "${changed[@]}" ##