Closed RyanofWoods closed 1 year ago
It looks like this PR is missing a label to determine the type of change it introduces. The maintainer should add one of the following labels:
bug
for bugfixes.enhancement
for new features and improvements.documentation
for documentation changes.security
for security patches.removed
for feature removals.infrastructure
for internal changes that should not go in the changelog.Additionally, the maintainer may also want to add one of the following:
breaking
for breaking changes.deprecated
for feature deprecations.Once the correct labels have been set, simply remove the needs changelog label
label from this PR so I can merge it.
It would probably be good to update some extension's sandbox script after this change. Note, I may soon make another PR to change the sandbox.tt
further, so we may want to wait π
As another note, from my understanding, each extension copies the sandbox.tt
file, but maybe it would reduce overhead, if extensions could just delegate to using the solidus_dev_support
sandbox script if it doesn't need to modify it, so it doesn't need updating if changes are made to the main one. π€ On the other hand, changes to the main one could break the extension's sandbox setup.
I am unable to change the label @waiting-for-dev
As another note, from my understanding, each extension copies the sandbox.tt file, but maybe it would reduce overhead, if extensions could just delegate to using the solidus_dev_support sandbox script if it doesn't need to modify it, so it doesn't need updating if changes are made to the main one. π€ On the other hand, changes to the main one could break the extension's sandbox setup.
Yeah, at this point, the purpose of the sandbox application is to be used as a starting point, so I wouldn't change anything for now.
Fixes the
sandbox.tt
file script not defaulting to themaster
Solidus when noSOLIDUS_BRANCH
variable is given.Summary
When an uninitialized variable is given to
-n
, it is treated as not NULL. The variable must be quoted for correct results.[ -n "$SOLIDUS_BRANCH" ]
It is also recommended for variable comparisons in general as it can produce incorrect results for
! -z
.References:
This meant that before, when running this file with no SOLIDUS_BRANCH variable, $BRANCH would end up NULL and the branch in the Gemfile would be an empty string. This caused an error, whereas instead, it should have defaulted to
master
.Error:
Checklist
To test this, I commented out half of the
sandbox.tt
file after (extension_name="<%= file_name %>"
) and ran:It logged that the
master
branch was being used andsolidus_frontend
and no debug mode was used.I then ran:
Which logged that the
v.3.2
Solidus branch was being used andsolidus_starter_frontend
for the frontend π It also correctly used the debug mode.