Commit cd097e93 authored by Gasol Wu's avatar Gasol Wu

Fix missing VERSION on Mac by using tr instead of sed

Following message was generated by running `make build` on macOS seirra

    sed: illegal option -- r
    usage: sed script [-Ealn] [-i extension] [file ...]
           sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ...  [file ...]

The command tr is more portable and available on Linux, BSD and Mac.
parent b4c159dc
......@@ -16,7 +16,7 @@ if [[ $(echo ${exact_tag} | grep -E "^[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$") ]]; t
last_tag=$(git log --first-parent --pretty="%d" | grep -E "tag: v[0-9]+\.[0-9]+\.[0-9]+(\)|,)" -o | grep "v[0-9]*\.[0-9]*\.[0-9]*" -o | head -n 1)
commits=$(git log --oneline ${last_tag}..HEAD | wc -l | sed -r 's/[ ]+//')
commits=$(git log --oneline ${last_tag}..HEAD | wc -l | tr -d ' ')
revision=$(git rev-parse --short HEAD || echo unknown)
echo "${version}~beta.${commits}.g${revision}"
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment