Skip to content

Instantly share code, notes, and snippets.

@bkakadiya42
Last active August 18, 2020 04:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bkakadiya42/91979893218324620ba791ae2082ef3f to your computer and use it in GitHub Desktop.
Save bkakadiya42/91979893218324620ba791ae2082ef3f to your computer and use it in GitHub Desktop.
#!/bin/sh
# This script regenerates the forestadmin.com models in a single step.
# Please replace <domain.com> below and add this file to the root of your forest admin backend repo.
# Author: https://github.com/bkakadiya42
set -o allexport
. ./.env
set +o allexport
pushd .
cd ..
rm -rf draft
lumber generate "draft" -e "$DATABASE_USER@<domain.com>" --connection-url "postgres://$DATABASE_USER@$DATABASE_HOST:5432/$DATABASE_NAME?sslmode=disable" -S $DATABASE_SSL -s "$DATABASE_SCHEMA" -H "$DATABASE_HOST" -p "$APPLICATION_PORT"
cp -r draft/models/ server-admin/models/
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment