mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-12-15 11:22:49 +03:00
Pull request 2150: AG-28455 rc versions
Squashed commit of the following:
commit 9b80bf2da8676c7a80982b88b547b35760afd4dd
Merge: 2c184158c fede29794
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date: Fri Feb 16 15:49:23 2024 +0300
Merge branch 'master' into AG-28455-rc-versions
commit 2c184158c052dc1ddc57f4bdf53ad31a50410659
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date: Wed Feb 14 13:01:30 2024 +0300
scripts: imp code
commit f0965058ad2231b342cf406a8434d76cc3f546c2
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date: Tue Feb 13 14:52:10 2024 +0300
scripts: imp code
commit a5bed23c7077ea3655ae88528c1dfc5ea9d061a7
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date: Mon Feb 12 18:35:52 2024 +0300
scripts: fix typo
commit 36e9ea1ac3403a53452fcc16d35d32ec7663fd1e
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date: Mon Feb 12 15:41:57 2024 +0300
scripts: revert changes, imp docs
commit d74c85d4ec77b12ceaae28db5a8e7961896d688a
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date: Mon Feb 5 18:12:38 2024 +0300
all: mark rc versions separately
This commit is contained in:
parent
fede297942
commit
bd99e3e09d
@ -6,6 +6,7 @@
|
|||||||
'name': 'AdGuard Home - Build and run tests'
|
'name': 'AdGuard Home - Build and run tests'
|
||||||
'variables':
|
'variables':
|
||||||
'dockerGo': 'adguard/golang-ubuntu:8.0'
|
'dockerGo': 'adguard/golang-ubuntu:8.0'
|
||||||
|
'channel': 'development'
|
||||||
|
|
||||||
'stages':
|
'stages':
|
||||||
- 'Tests':
|
- 'Tests':
|
||||||
@ -73,7 +74,7 @@
|
|||||||
make\
|
make\
|
||||||
ARCH="amd64"\
|
ARCH="amd64"\
|
||||||
OS="windows darwin linux"\
|
OS="windows darwin linux"\
|
||||||
CHANNEL="development"\
|
CHANNEL=${bamboo.channel}\
|
||||||
SIGN=0\
|
SIGN=0\
|
||||||
PARALLELISM=1\
|
PARALLELISM=1\
|
||||||
VERBOSE=2\
|
VERBOSE=2\
|
||||||
@ -115,3 +116,16 @@
|
|||||||
'labels': []
|
'labels': []
|
||||||
'other':
|
'other':
|
||||||
'concurrent-build-plugin': 'system-default'
|
'concurrent-build-plugin': 'system-default'
|
||||||
|
|
||||||
|
'branch-overrides':
|
||||||
|
# rc-vX.Y.Z branches are the release candidate branches. They are created
|
||||||
|
# from the release branch and are used to build the release candidate
|
||||||
|
# images.
|
||||||
|
- '^rc-v[0-9]+\.[0-9]+\.[0-9]+':
|
||||||
|
# Build betas on release branches manually.
|
||||||
|
'triggers': []
|
||||||
|
# Set the default release channel on the release branch to beta, as we
|
||||||
|
# may need to build a few of these.
|
||||||
|
'variables':
|
||||||
|
'dockerGo': 'adguard/golang-ubuntu:8.0'
|
||||||
|
'channel': 'candidate'
|
||||||
|
@ -51,12 +51,12 @@ readonly channel
|
|||||||
|
|
||||||
case "$channel"
|
case "$channel"
|
||||||
in
|
in
|
||||||
('development'|'edge'|'beta'|'release')
|
('development'|'edge'|'beta'|'release'|'candidate')
|
||||||
# All is well, go on.
|
# All is well, go on.
|
||||||
;;
|
;;
|
||||||
(*)
|
(*)
|
||||||
echo "invalid channel '$channel', supported values are\
|
echo "invalid channel '$channel', supported values are\
|
||||||
'development', 'edge', 'beta', and 'release'" 1>&2
|
'development', 'edge', 'beta', 'release', and 'candidate'" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -43,7 +43,7 @@ bump_minor='/^v[0-9]+\.[0-9]+\.0$/ {
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
printf("invalid release version: \"%s\"\n", $0);
|
printf("invalid minor release version: \"%s\"\n", $0);
|
||||||
|
|
||||||
exit 1;
|
exit 1;
|
||||||
}'
|
}'
|
||||||
@ -128,15 +128,40 @@ in
|
|||||||
|
|
||||||
version="$last_tag"
|
version="$last_tag"
|
||||||
;;
|
;;
|
||||||
|
('candidate')
|
||||||
|
# This pseudo-channel is used to set a proper versions into release
|
||||||
|
# candidate builds.
|
||||||
|
|
||||||
|
# last_tag is expected to be the latest release tag.
|
||||||
|
last_tag="$( git describe --abbrev=0 )"
|
||||||
|
readonly last_tag
|
||||||
|
|
||||||
|
# current_branch is the name of the branch currently checked out.
|
||||||
|
current_branch="$( git rev-parse --abbrev-ref HEAD )"
|
||||||
|
readonly current_branch
|
||||||
|
|
||||||
|
# The branch should be named like:
|
||||||
|
#
|
||||||
|
# rc-v12.34.56
|
||||||
|
#
|
||||||
|
if ! echo "$current_branch" | grep -E -e '^rc-v[0-9]+\.[0-9]+\.[0-9]+$' -q
|
||||||
|
then
|
||||||
|
echo "invalid release candidate branch name '$current_branch'" 1>&2
|
||||||
|
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
version="${current_branch#rc-}-rc.$( git rev-list --count "$last_tag"..HEAD )"
|
||||||
|
;;
|
||||||
(*)
|
(*)
|
||||||
echo "invalid channel '$channel', supported values are\
|
echo "invalid channel '$channel', supported values are\
|
||||||
'development', 'edge', 'beta', and 'release'" 1>&2
|
'development', 'edge', 'beta', 'release' and 'candidate'" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Finally, make sure that we don't output invalid versions.
|
# Finally, make sure that we don't output invalid versions.
|
||||||
if ! echo "$version" | grep -E -e '^v[0-9]+\.[0-9]+\.[0-9]+(-(a|b|dev)\.[0-9]+)?(\+[[:xdigit:]]+)?$' -q
|
if ! echo "$version" | grep -E -e '^v[0-9]+\.[0-9]+\.[0-9]+(-(a|b|dev|rc)\.[0-9]+)?(\+[[:xdigit:]]+)?$' -q
|
||||||
then
|
then
|
||||||
echo "generated an invalid version '$version'" 1>&2
|
echo "generated an invalid version '$version'" 1>&2
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user