From c359f7cde0446907a353f58486d0eef2dea8b9de Mon Sep 17 00:00:00 2001 From: Jeff Ohrstrom Date: Thu, 7 Dec 2023 13:37:32 -0500 Subject: [PATCH] enhance this helper for building test assets (#3238) --- apps/dashboard/bin/recompile_js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/dashboard/bin/recompile_js b/apps/dashboard/bin/recompile_js index d7f7177c42..9b576298ae 100755 --- a/apps/dashboard/bin/recompile_js +++ b/apps/dashboard/bin/recompile_js @@ -1,7 +1,12 @@ #!/bin/bash -export RAILS_ENV='development' -export RAILS_RELATIVE_URL_ROOT='/pun/dev/dashboard' +if [[ -n "$1" ]]; then + export RAILS_ENV='test' + export RAILS_RELATIVE_URL_ROOT='/' +else + export RAILS_ENV='development' + export RAILS_RELATIVE_URL_ROOT='/pun/dev/dashboard' +fi bin/rails assets:clobber bin/rails assets:precompile