Skip to content

Commit 70ec57b

Browse files
committed
Support different solidus frontend options through an env var
Default to the legacy frontend as it's the one used in most existing extensions, and let the transition be opt-in.
1 parent 7131fd7 commit 70ec57b

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

  • lib/solidus_dev_support/templates/extension/bin

lib/solidus_dev_support/templates/extension/bin/sandbox.tt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ else
3232
fi
3333
echo "~~> Using branch $BRANCH of solidus"
3434

35+
if [ -z $SOLIDUS_FRONTEND ]
36+
then
37+
echo "~~> Use 'export SOLIDUS_FRONTEND=[solidus_frontend|solidus_starter_frontend]' to control the Solidus frontend"
38+
SOLIDUS_FRONTEND="solidus_frontend"
39+
fi
40+
echo "~~> Using branch $SOLIDUS_FRONTEND as the solidus frontend"
41+
3542
extension_name="<%= file_name %>"
3643

3744
# Stay away from the bundler env of the containing extension.
@@ -80,6 +87,7 @@ unbundled bundle exec rails generate solidus:install \
8087
--enforce_available_locales=true \
8188
--with-authentication=false \
8289
--payment-method=none \
90+
--frontend=${SOLIDUS_FRONTEND} \
8391
$@
8492

8593
unbundled bundle exec rails generate solidus:auth:install

0 commit comments

Comments
 (0)