File tree Expand file tree Collapse file tree 5 files changed +48
-16
lines changed Expand file tree Collapse file tree 5 files changed +48
-16
lines changed Original file line number Diff line number Diff line change 5
5
replace github.com/redis/go-redis/v9 => ../..
6
6
7
7
require (
8
- github.com/redis/go-redis/v9 v9.13 .0
8
+ github.com/redis/go-redis/v9 v9.14 .0
9
9
go.uber.org/zap v1.24.0
10
10
)
11
11
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ replace github.com/redis/go-redis/extra/redisotel/v9 => ../../extra/redisotel
11
11
replace github.com/redis/go-redis/extra/rediscmd/v9 => ../../extra/rediscmd
12
12
13
13
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
15
15
github.com/redis/go-redis/v9 v9.14.0
16
16
github.com/uptrace/uptrace-go v1.21.0
17
17
go.opentelemetry.io/otel v1.22.0
@@ -25,7 +25,7 @@ require (
25
25
github.com/go-logr/stdr v1.2.2 // indirect
26
26
github.com/golang/protobuf v1.5.3 // indirect
27
27
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
29
29
go.opentelemetry.io/contrib/instrumentation/runtime v0.46.1 // indirect
30
30
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.44.0 // indirect
31
31
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ replace github.com/redis/go-redis/v9 => ../..
7
7
replace github.com/redis/go-redis/extra/rediscmd/v9 => ../rediscmd
8
8
9
9
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
11
11
github.com/redis/go-redis/v9 v9.14.0
12
12
go.opencensus.io v0.24.0
13
13
)
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ replace github.com/redis/go-redis/v9 => ../..
7
7
replace github.com/redis/go-redis/extra/rediscmd/v9 => ../rediscmd
8
8
9
9
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
11
11
github.com/redis/go-redis/v9 v9.14.0
12
12
go.opentelemetry.io/otel v1.22.0
13
13
go.opentelemetry.io/otel/metric v1.22.0
Original file line number Diff line number Diff line change 2
2
3
3
set -e
4
4
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
+
5
27
help () {
6
28
cat << - EOF
7
- Usage: TAG=tag $0
29
+ Usage: $0 TAGVERSION [-t]
8
30
9
31
Creates git tags for public Go packages.
10
32
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)
13
38
EOF
14
39
exit 0
15
40
}
16
41
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"
21
44
fi
22
45
23
46
if ! grep -Fq " \" ${TAG# v} \" " version.go
@@ -31,12 +54,21 @@ PACKAGE_DIRS=$(find . -mindepth 2 -type f -name 'go.mod' -exec dirname {} \; \
31
54
| sed ' s/^\.\///' \
32
55
| sort)
33
56
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}
36
68
37
69
for dir in $PACKAGE_DIRS
38
70
do
39
71
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}
42
74
done
You can’t perform that action at this time.
0 commit comments