Pull request 1747: chlog-and-proj-skel

Merge in DNS/adguard-home from chlog-and-proj-skel to master

Squashed commit of the following:

commit 8e7c3e2eb50c559bdcd5862e72c16511dd8272da
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue Feb 21 16:52:10 2023 +0300

    all: upd proj skel
This commit is contained in:
Ainar Garipov
2023-02-21 17:07:12 +03:00
parent 20531de760
commit ff9b24ad69
10 changed files with 130 additions and 48 deletions

View File

@@ -6,6 +6,11 @@
# only has superficial knowledge of the POSIX shell language and alike.
# Experienced readers may find it overly verbose.
# This comment is used to simplify checking local copies of the script. Bump
# this number every time a significant change is made to this script.
#
# AdGuard-Project-Version: 1
# The default verbosity level is 0. Show every command that is run and every
# package that is processed if the caller requested verbosity level greater than
# 0. Also show subcommands if the requested verbosity level is greater than 1.
@@ -111,17 +116,17 @@ readonly o_flags
# must be enabled.
if [ "${RACE:-0}" -eq '0' ]
then
cgo_enabled='0'
CGO_ENABLED='0'
race_flags='--race=0'
else
cgo_enabled='1'
CGO_ENABLED='1'
race_flags='--race=1'
fi
readonly cgo_enabled race_flags
readonly CGO_ENABLED race_flags
export CGO_ENABLED
CGO_ENABLED="$cgo_enabled"
GO111MODULE='on'
export CGO_ENABLED GO111MODULE
export GO111MODULE
# Build the new binary if requested.
if [ "${NEXTAPI:-0}" -eq '0' ]
@@ -132,5 +137,16 @@ else
fi
readonly tags_flags
"$go" build --ldflags "$ldflags" "$race_flags" "$tags_flags" --trimpath "$o_flags" "$v_flags"\
if [ "$verbose" -gt '0' ]
then
"$go" env
fi
"$go" build\
--ldflags "$ldflags"\
"$race_flags"\
"$tags_flags"\
--trimpath\
"$o_flags"\
"$v_flags"\
"$x_flags"