Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion example/del-keys-without-ttl/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down
4 changes: 2 additions & 2 deletions example/otel/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion extra/rediscensus/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
2 changes: 1 addition & 1 deletion extra/redisotel/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
54 changes: 43 additions & 11 deletions scripts/tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Loading