Pull request: 3033 verbose version output
Merge in DNS/adguard-home from 3033-version-bug to master Closes #3033. Squashed commit of the following: commit b10bd35c5c2e5a922af730e5c0930e6cd92c7855 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon May 24 21:15:46 2021 +0300 all: fix & imp scripts, rm main module version
This commit is contained in:
@@ -84,6 +84,9 @@ in
|
||||
# minor release. If the current commit is the new minor release,
|
||||
# num_commits_since_minor is zero.
|
||||
num_commits_since_minor="$( git rev-list "${last_minor_zero}..HEAD" | wc -l )"
|
||||
# The output of darwin's implementation of wc needs to be trimmed from
|
||||
# redundant spaces.
|
||||
num_commits_since_minor="$( echo ${num_commits_since_minor} | tr -d '[:space:]' )"
|
||||
readonly num_commits_since_minor
|
||||
|
||||
# next_minor is the next minor release version.
|
||||
@@ -126,7 +129,7 @@ in
|
||||
esac
|
||||
|
||||
# Finally, make sure that we don't output invalid versions.
|
||||
if ! echo "$version" | grep -E -e '^v[0-9]+\.[0-9]+\.[0-9]+(-[ab]\.[0-9]+)?(\+[[:xdigit:]]+)?' -q
|
||||
if ! echo "$version" | grep -E -e '^v[0-9]+\.[0-9]+\.[0-9]+(-[ab]\.[0-9]+)?(\+[[:xdigit:]]+)?$' -q
|
||||
then
|
||||
echo "generated an invalid version '$version'" 1>&2
|
||||
|
||||
|
||||
Reference in New Issue
Block a user