Skip to content

Commit 2da6ca0

Browse files
chore(release): Update the rest of the versions (#3513)
* chore(release): Update the rest of the versions * improved tag script
1 parent c11a704 commit 2da6ca0

File tree

5 files changed

+48
-16
lines changed

5 files changed

+48
-16
lines changed

example/del-keys-without-ttl/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.18
55
replace github.com/redis/go-redis/v9 => ../..
66

77
require (
8-
github.com/redis/go-redis/v9 v9.13.0
8+
github.com/redis/go-redis/v9 v9.14.0
99
go.uber.org/zap v1.24.0
1010
)
1111

example/otel/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ replace github.com/redis/go-redis/extra/redisotel/v9 => ../../extra/redisotel
1111
replace github.com/redis/go-redis/extra/rediscmd/v9 => ../../extra/rediscmd
1212

1313
require (
14-
github.com/redis/go-redis/extra/redisotel/v9 v9.13.0
14+
github.com/redis/go-redis/extra/redisotel/v9 v9.14.0
1515
github.com/redis/go-redis/v9 v9.14.0
1616
github.com/uptrace/uptrace-go v1.21.0
1717
go.opentelemetry.io/otel v1.22.0
@@ -25,7 +25,7 @@ require (
2525
github.com/go-logr/stdr v1.2.2 // indirect
2626
github.com/golang/protobuf v1.5.3 // indirect
2727
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect
28-
github.com/redis/go-redis/extra/rediscmd/v9 v9.13.0 // indirect
28+
github.com/redis/go-redis/extra/rediscmd/v9 v9.14.0 // indirect
2929
go.opentelemetry.io/contrib/instrumentation/runtime v0.46.1 // indirect
3030
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.44.0 // indirect
3131
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect

extra/rediscensus/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ replace github.com/redis/go-redis/v9 => ../..
77
replace github.com/redis/go-redis/extra/rediscmd/v9 => ../rediscmd
88

99
require (
10-
github.com/redis/go-redis/extra/rediscmd/v9 v9.13.0
10+
github.com/redis/go-redis/extra/rediscmd/v9 v9.14.0
1111
github.com/redis/go-redis/v9 v9.14.0
1212
go.opencensus.io v0.24.0
1313
)

extra/redisotel/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ replace github.com/redis/go-redis/v9 => ../..
77
replace github.com/redis/go-redis/extra/rediscmd/v9 => ../rediscmd
88

99
require (
10-
github.com/redis/go-redis/extra/rediscmd/v9 v9.13.0
10+
github.com/redis/go-redis/extra/rediscmd/v9 v9.14.0
1111
github.com/redis/go-redis/v9 v9.14.0
1212
go.opentelemetry.io/otel v1.22.0
1313
go.opentelemetry.io/otel/metric v1.22.0

scripts/tag.sh

Lines changed: 43 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,45 @@
22

33
set -e
44

5+
DRY_RUN=1
6+
7+
if [ $# -eq 0 ]; then
8+
echo "Error: Tag version is required"
9+
help
10+
fi
11+
12+
TAG=$1
13+
shift
14+
15+
while getopts "t" opt; do
16+
case $opt in
17+
t)
18+
DRY_RUN=0
19+
;;
20+
\?)
21+
echo "Invalid option: -$OPTARG" >&2
22+
exit 1
23+
;;
24+
esac
25+
done
26+
527
help() {
628
cat <<- EOF
7-
Usage: TAG=tag $0
29+
Usage: $0 TAGVERSION [-t]
830
931
Creates git tags for public Go packages.
1032
11-
VARIABLES:
12-
TAG git tag, for example, v1.0.0
33+
ARGUMENTS:
34+
TAGVERSION Tag version to create, for example v1.0.0
35+
36+
OPTIONS:
37+
-t Execute git commands (default: dry run)
1338
EOF
1439
exit 0
1540
}
1641

17-
if [ -z "$TAG" ]
18-
then
19-
printf "TAG env var is required\n\n";
20-
help
42+
if [ "$DRY_RUN" -eq 1 ]; then
43+
echo "Running in dry-run mode"
2144
fi
2245

2346
if ! grep -Fq "\"${TAG#v}\"" version.go
@@ -31,12 +54,21 @@ PACKAGE_DIRS=$(find . -mindepth 2 -type f -name 'go.mod' -exec dirname {} \; \
3154
| sed 's/^\.\///' \
3255
| sort)
3356

34-
git tag ${TAG}
35-
git push origin ${TAG}
57+
58+
execute_git_command() {
59+
if [ "$DRY_RUN" -eq 0 ]; then
60+
"$@"
61+
else
62+
echo "DRY-RUN: Would execute: $@"
63+
fi
64+
}
65+
66+
execute_git_command git tag ${TAG}
67+
execute_git_command git push origin ${TAG}
3668

3769
for dir in $PACKAGE_DIRS
3870
do
3971
printf "tagging ${dir}/${TAG}\n"
40-
git tag ${dir}/${TAG}
41-
git push origin ${dir}/${TAG}
72+
execute_git_command git tag ${dir}/${TAG}
73+
execute_git_command git push origin ${dir}/${TAG}
4274
done

0 commit comments

Comments
 (0)