Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Fixed sandbox generation script (#12002)
Damian Legawiecc45f16e9a8a4
diff --git a/bin/sandbox.sh b/bin/sandbox.shindex e937c0c57c..9eb704fb47 100755--- a/bin/sandbox.sh+++ b/bin/sandbox.sh@@ -7,9 +7,12 @@ case "$DB" inmysql)RAILSDB="mysql";;-postgres|'')+postgres)RAILSDB="postgresql";;+sqlite|'')+ RAILSDB="sqlite3"+ ;;*)echo "Invalid DB specified: $DB"exit 1@@ -22,11 +25,7 @@ bundle exec rails new sandbox --database="$RAILSDB" \--skip-git \--skip-keeps \--skip-rc \- --skip-spring \--skip-test \- --skip-coffee \- --skip-javascript \- --skip-bootsnapif [ ! -d "sandbox" ]; thenecho 'sandbox rails application failed'@@ -35,28 +34,29 @@ ficd ./sandbox-# Gems listed below were tagged on 1 August 2022if [ "$SPREE_AUTH_DEVISE_PATH" != "" ]; thenSPREE_AUTH_DEVISE_GEM="gem 'spree_auth_devise', path: '$SPREE_AUTH_DEVISE_PATH'"else- # For now tag on branch main will be used,- # in the future replace it with 4.5-stable release- SPREE_AUTH_DEVISE_GEM="gem 'spree_auth_devise', github: 'spree/spree_auth_devise', tag: 'v4.5.0-development'"+ SPREE_AUTH_DEVISE_GEM="gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: 'main'"fiif [ "$SPREE_GATEWAY_PATH" != "" ]; thenSPREE_GATEWAY_GEM="gem 'spree_gateway', path: '$SPREE_GATEWAY_PATH'"else# spree_gateway 'main' branch has latest needed changes - this tag needs to be replaced after release of 4.5-stable- SPREE_GATEWAY_GEM="gem 'spree_gateway', github: 'spree/spree_gateway', tag: 'v4.5.0-development'"+ SPREE_GATEWAY_GEM="gem 'spree_gateway', github: 'spree/spree_gateway', branch: 'main'"fiif [ "$SPREE_DASHBOARD_PATH" != "" ]; thenSPREE_BACKEND_GEM="gem 'spree_backend', path: '$SPREE_DASHBOARD_PATH'"else- # For now tag on branch main will be used to provide compatibility with Rails 7,- # in the future replace it with 4.5-stable release- SPREE_BACKEND_GEM="gem 'spree_backend', github: 'spree/spree_backend', tag: 'v4.5.0-development'"+ SPREE_BACKEND_GEM="gem 'spree_backend', github: 'spree/spree_backend', branch: 'main'"+fi++if [ "$SPREE_STOREFRINT_PATH" != "" ]; then+ SPREE_STOREFRINT_PATH="gem 'spree_frontend', path: '$SPREE_DASHBOARD_PATH'"+else+ SPREE_STOREFRINT_PATH="gem 'spree_frontend', github: 'spree/spree_rails_frontend', branch: 'main'"ficat <<RUBY >> Gemfile@@ -64,8 +64,9 @@ gem 'spree', path: '..'gem 'spree_emails', path: '../emails'gem 'spree_sample', path: '../sample'$SPREE_BACKEND_GEM-$SPREE_AUTH_DEVISE_GEM$SPREE_GATEWAY_GEM+$SPREE_STOREFRINT_PATH+$SPREE_AUTH_DEVISE_GEMgem 'spree_i18n', github: 'spree-contrib/spree_i18n', ref: '3c3e5954888232153a78fa4168f40b3255586b3b'group :test, :development do@@ -82,7 +83,6 @@ gem 'mini_racer'# https://github.com/sass/sassc-ruby/commit/04407faf6fbd400f1c9f72f752395e1dfa5865f7gem 'sassc', github: 'sass/sassc-ruby', branch: 'master'-gem 'rack-cache'gem 'oj'gem 'jsbundling-rails'@@ -138,6 +138,7 @@ bin/rails db:drop || truebin/rails db:createbin/rails g spree:install --auto-accept --user_class=Spree::User --sample=truebin/rails g spree:backend:install+bin/rails g spree:frontend:installbin/rails g spree:emails:installbin/rails g spree:auth:installbin/rails g spree_gateway:install