New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow bundling with local govuk_frontend_toolkit #1035
Changes from 2 commits
8dd9c20
e367bad
995e55d
111450c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,30 @@ | ||
#!/bin/bash | ||
#!/bin/bash | ||
|
||
bundle install | ||
|
||
if [[ $1 == "--test-govuk-frontend-toolkit" ]] ; then | ||
# Find out where it the gem is installed | ||
installed_location="$(bundle show govuk_frontend_toolkit)" | ||
temporary_location="./tmp/govuk_frontend_toolkit_gem_dev" | ||
|
||
# Remove any existing tmp file | ||
rm -rf ${temporary_location} | ||
|
||
# Copy the old assets aside | ||
# Using sudo here since the installed location has elevated permissions | ||
sudo cp -r ${installed_location} ${temporary_location} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It'd be good for the comment to include why they are being copied There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mainly because I didn't want to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you update the comment so it’s clear? |
||
|
||
# Remove current submoduled assets | ||
rm -rf ${temporary_location}/app/assets | ||
|
||
# Symlink the local | ||
sudo ln -rs ../govuk_frontend_toolkit ${temporary_location}/app/assets | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In my local
If we add a Not sure what the best solution is TBH. |
||
|
||
export GOVUK_FRONTEND_TOOLKIT_DEV=true | ||
|
||
bundle install | ||
|
||
echo "Testing local govuk_frontend_toolkit" | ||
fi | ||
|
||
bundle exec rails s -p 3013 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels mildly dangerous