github.com/lestrrat-go/jwx/v2@v2.0.21/tools/cmd/genjwa.sh (about)

     1  #!/bin/bash
     2  
     3  # Script to perform code generation. This exists to overcome
     4  # the fact that go:generate doesn't really allow you to change directories
     5  
     6  # This file is expected to be executed from jwa directory
     7  
     8  set -e
     9  
    10  echo "👉 Generating JWA files..."
    11  DIR=../tools/cmd/genjwa
    12  
    13  pushd "$DIR" > /dev/null
    14  GOWORK=off go build -o .genjwa main.go
    15  popd > /dev/null
    16  
    17  EXE="${DIR}/.genjwa"
    18  "$EXE"
    19  echo "✔ done!"
    20  
    21  rm "$EXE"