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