all: upd go, chlog, tools
This commit is contained in:
@@ -5,22 +5,26 @@ FROM alpine:3.13
|
||||
ARG BUILD_DATE
|
||||
ARG VERSION
|
||||
ARG VCS_REF
|
||||
LABEL maintainer="AdGuard Team <devteam@adguard.com>" \
|
||||
org.opencontainers.image.created=$BUILD_DATE \
|
||||
org.opencontainers.image.url="https://adguard.com/adguard-home.html" \
|
||||
org.opencontainers.image.source="https://github.com/AdguardTeam/AdGuardHome" \
|
||||
org.opencontainers.image.version=$VERSION \
|
||||
org.opencontainers.image.revision=$VCS_REF \
|
||||
org.opencontainers.image.vendor="AdGuard" \
|
||||
org.opencontainers.image.title="AdGuard Home" \
|
||||
org.opencontainers.image.description="Network-wide ads & trackers blocking DNS server" \
|
||||
org.opencontainers.image.licenses="GPL-3.0"
|
||||
|
||||
LABEL\
|
||||
maintainer="AdGuard Team <devteam@adguard.com>" \
|
||||
org.opencontainers.image.authors="AdGuard Team <devteam@adguard.com>" \
|
||||
org.opencontainers.image.created=$BUILD_DATE \
|
||||
org.opencontainers.image.description="Network-wide ads & trackers blocking DNS server" \
|
||||
org.opencontainers.image.documentation="https://github.com/AdguardTeam/AdGuardHome/wiki/" \
|
||||
org.opencontainers.image.licenses="GPL-3.0" \
|
||||
org.opencontainers.image.revision=$VCS_REF \
|
||||
org.opencontainers.image.source="https://github.com/AdguardTeam/AdGuardHome" \
|
||||
org.opencontainers.image.title="AdGuard Home" \
|
||||
org.opencontainers.image.url="https://adguard.com/en/adguard-home/overview.html" \
|
||||
org.opencontainers.image.vendor="AdGuard" \
|
||||
org.opencontainers.image.version=$VERSION
|
||||
|
||||
# Update certificates.
|
||||
RUN apk --no-cache --update add ca-certificates libcap tzdata && \
|
||||
rm -rf /var/cache/apk/* && \
|
||||
mkdir -p /opt/adguardhome/conf /opt/adguardhome/work && \
|
||||
chown -R nobody: /opt/adguardhome
|
||||
rm -rf /var/cache/apk/* && \
|
||||
mkdir -p /opt/adguardhome/conf /opt/adguardhome/work && \
|
||||
chown -R nobody: /opt/adguardhome
|
||||
|
||||
ARG DIST_DIR
|
||||
ARG TARGETARCH
|
||||
|
||||
@@ -156,7 +156,8 @@ linux ppc64le - - -
|
||||
openbsd amd64 - - -
|
||||
openbsd arm64 - - -
|
||||
windows 386 - - -
|
||||
windows amd64 - - -"
|
||||
windows amd64 - - -
|
||||
windows arm64 - - -"
|
||||
readonly platforms
|
||||
|
||||
# Function build builds the release for one platform. It builds a binary, an
|
||||
|
||||
@@ -65,9 +65,9 @@ then
|
||||
fi
|
||||
readonly version
|
||||
|
||||
# Set date and time of the current build unless already set.
|
||||
buildtime="${BUILD_TIME:-$( date -u +%FT%TZ%z )}"
|
||||
readonly buildtime
|
||||
# Set date and time of the latest commit unless already set.
|
||||
committime="${SOURCE_DATE_EPOCH:-$( git log -1 --pretty=%ct )}"
|
||||
readonly committime
|
||||
|
||||
# Set the linker flags accordingly: set the release channel and the current
|
||||
# version as well as goarm and gomips variable values, if the variables are set
|
||||
@@ -78,7 +78,7 @@ readonly version_pkg
|
||||
ldflags="-s -w"
|
||||
ldflags="${ldflags} -X ${version_pkg}.version=${version}"
|
||||
ldflags="${ldflags} -X ${version_pkg}.channel=${channel}"
|
||||
ldflags="${ldflags} -X ${version_pkg}.buildtime=${buildtime}"
|
||||
ldflags="${ldflags} -X ${version_pkg}.committime=${committime}"
|
||||
if [ "${GOARM:-}" != '' ]
|
||||
then
|
||||
ldflags="${ldflags} -X ${version_pkg}.goarm=${GOARM}"
|
||||
|
||||
@@ -52,7 +52,7 @@ trap not_found EXIT
|
||||
go_version="$( "${GO:-go}" version )"
|
||||
readonly go_version
|
||||
|
||||
go_min_version='go1.16'
|
||||
go_min_version='go1.17'
|
||||
go_version_msg="
|
||||
warning: your go version (${go_version}) is different from the recommended minimal one (${go_min_version}).
|
||||
if you have the version installed, please set the GO environment variable.
|
||||
@@ -134,9 +134,10 @@ underscores() {
|
||||
-e '_bsd.go'\
|
||||
-e '_darwin.go'\
|
||||
-e '_freebsd.go'\
|
||||
-e '_openbsd.go'\
|
||||
-e '_linux.go'\
|
||||
-e '_little.go'\
|
||||
-e '_nolinux.go'\
|
||||
-e '_openbsd.go'\
|
||||
-e '_others.go'\
|
||||
-e '_test.go'\
|
||||
-e '_unix.go'\
|
||||
@@ -209,7 +210,7 @@ exit_on_output method_const
|
||||
|
||||
exit_on_output underscores
|
||||
|
||||
exit_on_output gofumpt --extra -l -s .
|
||||
exit_on_output gofumpt --extra -e -l .
|
||||
|
||||
golint --set_exit_status ./...
|
||||
|
||||
|
||||
@@ -35,10 +35,13 @@ fi
|
||||
readonly race_flags
|
||||
|
||||
go="${GO:-go}"
|
||||
readonly go
|
||||
|
||||
count_flags='--count=1'
|
||||
cover_flags='--coverprofile=./coverage.txt'
|
||||
shuffle_flags='--shuffle=on'
|
||||
timeout_flags="${TIMEOUT_FLAGS:---timeout=30s}"
|
||||
readonly go timeout_flags cover_flags count_flags
|
||||
readonly count_flags cover_flags shuffle_flags timeout_flags
|
||||
|
||||
"$go" test "$count_flags" "$cover_flags" "$race_flags" "$timeout_flags" "$x_flags" "$v_flags" ./...
|
||||
"$go" test "$count_flags" "$cover_flags" "$race_flags" "$shuffle_flags" "$timeout_flags"\
|
||||
"$x_flags" "$v_flags" ./...
|
||||
|
||||
@@ -86,6 +86,7 @@ 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:]' )"
|
||||
|
||||
Reference in New Issue
Block a user