chore(elvis): Add usage print

This commit is contained in:
Zaiming Shi 2021-01-20 12:37:21 +01:00
parent ca32ac310f
commit ed25c62fed
1 changed files with 9 additions and 1 deletions

View File

@ -1,10 +1,18 @@
#!/bin/bash
## This script checks style of changed files.
## Expect argument 1 to be the git compare base.
set -euo pipefail
ELVIS_VERSION='1.0.0-emqx-1'
base="${GITHUB_BASE_REF:-$1}"
base="${1:-}"
if [ "${base}" = "" ]; then
echo "Usage $0 <git-compare-base-ref>"
exit 1
fi
elvis_version="${2:-$ELVIS_VERSION}"
echo "elvis -v: $elvis_version"