...

Text file src/github.com/twmb/franz-go/bump-deps.sh

Documentation: github.com/twmb/franz-go

     1#!/bin/bash
     2
     3# call go mod tidy on all the examples
     4# you should call it from the same directory as this script
     5
     6set -euo pipefail
     7
     8minlang="1.18"
     9for modfile in $(find . -name 'go.mod' -print0 | xargs -0)
    10do
    11    moddir=$(dirname "$modfile")
    12    cd "$moddir"
    13    echo "$moddir"
    14    filelang="$(grep "^go " go.mod | tr -d 'go \n')"
    15    lang=" -go=$minlang"
    16    if [[ "$filelang" > "$minlang" ]]; then
    17        lang=" -go=$filelang"
    18    fi
    19    if [[ $(pwd) == *"/franz-go/examples/"* ]]; then
    20        lang=" -go=1.20"
    21    fi
    22    go get -u ./...; go mod tidy $lang
    23    cd - >/dev/null
    24done

View as plain text