Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ CACHE_DIR=${2:-}
ENV_DIR=${3:-}
BP_DIR=$(cd $(dirname ${0:-}); cd ..; pwd)

# Export SQLX_OFFLINE at build time, this is used in case we are using compile time
# checked and want to use the prepared metadata in sqlx-data.json
if [ -e "$ENV_DIR/SQLX_OFFLINE" ]; then
export SQLX_OFFLINE="$(cat $ENV_DIR/SQLX_OFFLINE)";
fi

# Export DATABASE_URL at build time, mostly because Diesel is the best way to
# do SQL in Rust right now, and Diesel will use it to generate code for the
# database schema.
Expand Down