github.com/lestrrat-go/jwx/v2@v2.0.21/tools/cmd/genjwt.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 jwt directory
     7  
     8  set -e
     9  
    10  echo "👉 Generating JWT files..."
    11  DIR=../tools/cmd/genjwt
    12  pushd "$DIR" > /dev/null
    13  GOWORK=off go build -o .genjwt main.go
    14  popd > /dev/null
    15  
    16  EXE="${DIR}/.genjwt"
    17  "$EXE" -objects="$DIR/objects.yml"
    18  echo "✔ done!"
    19  
    20  rm "$EXE"