2
0
mirror of https://github.com/lightninglabs/loop synced 2024-11-17 21:25:56 +00:00
loop/scripts/gen_sqlc_docker.sh

21 lines
426 B
Bash
Raw Normal View History

2023-05-17 17:05:34 +00:00
#!/bin/bash
set -e
# Directory of the script file, independent of where it's called from.
DIR="$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)"
# Use the user's cache directories
GOCACHE=`go env GOCACHE`
GOMODCACHE=`go env GOMODCACHE`
echo "Generating sql models and queries in go..."
docker run \
--rm \
--user "$UID:$(id -g)" \
-e UID=$UID \
-v "$DIR/../:/build" \
-w /build \
kjconroy/sqlc:1.17.2 generate