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 55replace github.com/redis/go-redis/v9 => ../..
66
77require (
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
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
1111replace github.com/redis/go-redis/extra/rediscmd/v9 => ../../extra/rediscmd
1212
1313require (
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
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ replace github.com/redis/go-redis/v9 => ../..
77replace github.com/redis/go-redis/extra/rediscmd/v9 => ../rediscmd
88
99require (
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)
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ replace github.com/redis/go-redis/v9 => ../..
77replace github.com/redis/go-redis/extra/rediscmd/v9 => ../rediscmd
88
99require (
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
Original file line number Diff line number Diff line change 22
33set -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+
527help () {
628 cat << - EOF
7- Usage: TAG=tag $0
29+ Usage: $0 TAGVERSION [-t]
830
931Creates 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)
1338EOF
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"
2144fi
2245
2346if ! 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
3769for dir in $PACKAGE_DIRS
3870do
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}
4274done
You can’t perform that action at this time.
0 commit comments