1
0
mirror of https://github.com/redis/go-redis.git synced 2025-10-20 09:52:25 +03:00

chore(release): Update the rest of the versions (#3513)

* chore(release): Update the rest of the versions

* improved tag script
This commit is contained in:
Hristo Temelski
2025-09-10 15:01:18 +03:00
committed by GitHub
parent c11a704481
commit 2da6ca07c0
5 changed files with 48 additions and 16 deletions

View File

@@ -5,7 +5,7 @@ go 1.18
replace github.com/redis/go-redis/v9 => ../..
require (
github.com/redis/go-redis/v9 v9.13.0
github.com/redis/go-redis/v9 v9.14.0
go.uber.org/zap v1.24.0
)

View File

@@ -11,7 +11,7 @@ replace github.com/redis/go-redis/extra/redisotel/v9 => ../../extra/redisotel
replace github.com/redis/go-redis/extra/rediscmd/v9 => ../../extra/rediscmd
require (
github.com/redis/go-redis/extra/redisotel/v9 v9.13.0
github.com/redis/go-redis/extra/redisotel/v9 v9.14.0
github.com/redis/go-redis/v9 v9.14.0
github.com/uptrace/uptrace-go v1.21.0
go.opentelemetry.io/otel v1.22.0
@@ -25,7 +25,7 @@ require (
github.com/go-logr/stdr v1.2.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect
github.com/redis/go-redis/extra/rediscmd/v9 v9.13.0 // indirect
github.com/redis/go-redis/extra/rediscmd/v9 v9.14.0 // indirect
go.opentelemetry.io/contrib/instrumentation/runtime v0.46.1 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.44.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect

View File

@@ -7,7 +7,7 @@ replace github.com/redis/go-redis/v9 => ../..
replace github.com/redis/go-redis/extra/rediscmd/v9 => ../rediscmd
require (
github.com/redis/go-redis/extra/rediscmd/v9 v9.13.0
github.com/redis/go-redis/extra/rediscmd/v9 v9.14.0
github.com/redis/go-redis/v9 v9.14.0
go.opencensus.io v0.24.0
)

View File

@@ -7,7 +7,7 @@ replace github.com/redis/go-redis/v9 => ../..
replace github.com/redis/go-redis/extra/rediscmd/v9 => ../rediscmd
require (
github.com/redis/go-redis/extra/rediscmd/v9 v9.13.0
github.com/redis/go-redis/extra/rediscmd/v9 v9.14.0
github.com/redis/go-redis/v9 v9.14.0
go.opentelemetry.io/otel v1.22.0
go.opentelemetry.io/otel/metric v1.22.0

View File

@@ -2,22 +2,45 @@
set -e
DRY_RUN=1
if [ $# -eq 0 ]; then
echo "Error: Tag version is required"
help
fi
TAG=$1
shift
while getopts "t" opt; do
case $opt in
t)
DRY_RUN=0
;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
;;
esac
done
help() {
cat <<- EOF
Usage: TAG=tag $0
Usage: $0 TAGVERSION [-t]
Creates git tags for public Go packages.
VARIABLES:
TAG git tag, for example, v1.0.0
ARGUMENTS:
TAGVERSION Tag version to create, for example v1.0.0
OPTIONS:
-t Execute git commands (default: dry run)
EOF
exit 0
}
if [ -z "$TAG" ]
then
printf "TAG env var is required\n\n";
help
if [ "$DRY_RUN" -eq 1 ]; then
echo "Running in dry-run mode"
fi
if ! grep -Fq "\"${TAG#v}\"" version.go
@@ -31,12 +54,21 @@ PACKAGE_DIRS=$(find . -mindepth 2 -type f -name 'go.mod' -exec dirname {} \; \
| sed 's/^\.\///' \
| sort)
git tag ${TAG}
git push origin ${TAG}
execute_git_command() {
if [ "$DRY_RUN" -eq 0 ]; then
"$@"
else
echo "DRY-RUN: Would execute: $@"
fi
}
execute_git_command git tag ${TAG}
execute_git_command git push origin ${TAG}
for dir in $PACKAGE_DIRS
do
printf "tagging ${dir}/${TAG}\n"
git tag ${dir}/${TAG}
git push origin ${dir}/${TAG}
execute_git_command git tag ${dir}/${TAG}
execute_git_command git push origin ${dir}/${TAG}
done