github.com/TugasAkhir-QUIC/quic-go@v0.0.2-0.20240215011318-d20e25a9054c/.github/workflows/go-generate.sh (about)

     1  #!/usr/bin/env bash
     2  
     3  set -e
     4  
     5  DIR=$(pwd)
     6  TMP=$(mktemp -d)
     7  cd "$TMP"
     8  cp -r "$DIR" orig
     9  cp -r "$DIR" generated
    10  
    11  cd generated
    12  # delete all go-generated files generated (that adhere to the comment convention)
    13  grep --include \*.go -lrIZ "^// Code generated .* DO NOT EDIT\.$" . | xargs --null rm
    14  
    15  # First regenerate sys_conn_buffers_write.go.
    16  # If it doesn't exist, the following mockgen calls will fail.
    17  go generate -run "sys_conn_buffers_write.go"
    18  # now generate everything
    19  go generate ./...
    20  cd ..
    21  
    22  # don't compare fuzzing corpora
    23  diff --exclude=corpus --exclude=.git -ruN orig generated