...

Text file src/github.com/stretchr/testify/.ci.gogenerate.sh

Documentation: github.com/stretchr/testify

     1#!/bin/bash
     2
     3# If GOMOD is defined we are running with Go Modules enabled, either
     4# automatically or via the GO111MODULE=on environment variable. Codegen only
     5# works with modules, so skip generation if modules is not in use.
     6if [[ -z "$(go env GOMOD)" ]]; then
     7  echo "Skipping go generate because modules not enabled and required"
     8  exit 0
     9fi
    10
    11go generate ./...
    12if [ -n "$(git diff)" ]; then
    13  echo "Go generate had not been run"
    14  git diff
    15  exit 1
    16fi

View as plain text