-
Notifications
You must be signed in to change notification settings - Fork 1.7k
magento/devdocs#: Editing. Add bash syntax to command line #4274
Conversation
- https://devdocs.magento.com/guides/v2.1/cloud/cdn/configure-fastly.html - https://devdocs.magento.com/guides/v2.2/cloud/cdn/configure-fastly.html - https://devdocs.magento.com/guides/v2.3/cloud/cdn/configure-fastly.html - https://devdocs.magento.com/guides/v2.1/cloud/howtos/sample-data.html - https://devdocs.magento.com/guides/v2.2/cloud/howtos/sample-data.html - https://devdocs.magento.com/guides/v2.3/cloud/howtos/sample-data.html - https://devdocs.magento.com/guides/v2.1/cloud/live/live-sanity-check.html - https://devdocs.magento.com/guides/v2.2/cloud/live/live-sanity-check.html - https://devdocs.magento.com/guides/v2.3/cloud/live/live-sanity-check.html - https://devdocs.magento.com/guides/v2.1/cloud/live/sens-data-initial.html - https://devdocs.magento.com/guides/v2.2/cloud/live/sens-data-initial.html - https://devdocs.magento.com/guides/v2.3/cloud/live/sens-data-initial.html - https://devdocs.magento.com/guides/v2.1/cloud/trouble/redis-troubleshooting.html - https://devdocs.magento.com/guides/v2.2/cloud/trouble/redis-troubleshooting.html - https://devdocs.magento.com/guides/v2.3/cloud/trouble/redis-troubleshooting.html - https://devdocs.magento.com/guides/v2.1/cloud/trouble/trouble-error-html-minification.html - https://devdocs.magento.com/guides/v2.2/cloud/trouble/trouble-error-html-minification.html - https://devdocs.magento.com/guides/v2.3/cloud/trouble/trouble-error-html-minification.html - https://devdocs.magento.com/guides/v2.1/comp-mgr/trouble/cman/ce-ee-upgrade.html - https://devdocs.magento.com/guides/v2.2/comp-mgr/trouble/cman/ce-ee-upgrade.html - https://devdocs.magento.com/guides/v2.3/comp-mgr/trouble/cman/ce-ee-upgrade.html - https://devdocs.magento.com/guides/v2.1/config-guide/cli/config-cli-subcommands-cache.html - https://devdocs.magento.com/guides/v2.2/config-guide/cli/config-cli-subcommands-cache.html - https://devdocs.magento.com/guides/v2.1/config-guide/cli/config-cli-subcommands-compiler.html - https://devdocs.magento.com/guides/v2.2/config-guide/cli/config-cli-subcommands-compiler.html - https://devdocs.magento.com/guides/v2.3/config-guide/cli/config-cli-subcommands-compiler.html - https://devdocs.magento.com/guides/v2.1/config-guide/cli/config-cli-subcommands-i18n.html - https://devdocs.magento.com/guides/v2.2/config-guide/cli/config-cli-subcommands-i18n.html - https://devdocs.magento.com/guides/v2.3/config-guide/cli/config-cli-subcommands-i18n.html - https://devdocs.magento.com/guides/v2.1/config-guide/cli/config-cli-subcommands-spt-util.html - https://devdocs.magento.com/guides/v2.2/config-guide/cli/config-cli-subcommands-spt-util.html - https://devdocs.magento.com/guides/v2.3/config-guide/cli/config-cli-subcommands-spt-util.html - https://devdocs.magento.com/guides/v2.1/config-guide/cli/config-cli-subcommands-static-view.html - https://devdocs.magento.com/guides/v2.2/config-guide/cli/config-cli-subcommands-static-view.html - https://devdocs.magento.com/guides/v2.3/config-guide/cli/config-cli-subcommands-static-view.html - https://devdocs.magento.com/guides/v2.1/config-guide/cli/config-cli-subcommands-urn.html - https://devdocs.magento.com/guides/v2.2/config-guide/cli/config-cli-subcommands-urn.html - https://devdocs.magento.com/guides/v2.3/config-guide/cli/config-cli-subcommands-urn.html - https://devdocs.magento.com/guides/v2.1/config-guide/prod/prod_file-sys-perms.html - https://devdocs.magento.com/guides/v2.2/config-guide/prod/prod_file-sys-perms.html - https://devdocs.magento.com/guides/v2.3/config-guide/prod/prod_file-sys-perms.html - https://devdocs.magento.com/guides/v2.1/config-guide/solr/solr-magento.html - https://devdocs.magento.com/guides/v2.1/ext-best-practices/extension-coding/example-module-adminpage.html - https://devdocs.magento.com/guides/v2.1/extension-dev-guide/cli-cmds/cli-naming-guidelines.html - https://devdocs.magento.com/guides/v2.1/extension-dev-guide/prepare/lifecycle.html - https://devdocs.magento.com/guides/v2.1/frontend-dev-guide/themes/theme-images.html - https://devdocs.magento.com/guides/v2.1/install-gde/install/cli/dev_downgrade.html - https://devdocs.magento.com/guides/v2.1/install-gde/install/cli/dev_update-magento.html
An admin must run tests on this PR before it can be merged. |
Nice. |
* In the "repositories" section, you should have: | ||
|
||
```json | ||
"fastly-magento2": { |
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.
Pull in indenting in things like this.
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.
fixed
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.
done
git push origin <branch name> | ||
```bash | ||
git add -A && git commit -m "Install sample data" | ||
git push origin <branch name> |
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.
Each gets its own ```bash block.
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.
done
|
||
The following snippet from `config.local.php` shows an example of changing the default locale to `en_GB` and changing static file optimization settings: | ||
|
||
```php |
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.
The PRE tags are the old highlighting code. It should be removed.
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.
Wrap the code in a php block, and place this line immediately below the block
{: .no-copy }
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.
done
The following command adds, commits, and pushes to master: | ||
|
||
git add app/etc/config.local.php && git commit -m "Add system-specific configuration" && git push origin master | ||
```bash |
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.
Remove blank line below and on the others.
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.
done
|
||
php <your Magento install dir>/bin/magento setup:upgrade | ||
```bash | ||
php <your Magento install dir>/bin/magento setup:upgrade |
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.
Use <magento_root>
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.
Use <magento_root>
done
|
||
php bin/magento setup:upgrade && php bin/magento cache:clean | ||
```bash | ||
php bin/magento setup:upgrade && php bin/magento cache:clean |
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.
The convention is just bin/magento command...
You can remove the php
from all these commands.
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.
The convention is just bin/magento command...
You can remove the php from all these commands.
implemented
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.
The blanket PHP changes made can not apply to Cloud documentation. Some of those affect sample code for copy to YAML files and will cause errors without the "PHP". Please revert changes to Cloud documentation for PHP command.
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.
The blanket PHP changes made can not apply to Cloud documentation. Some of those affect sample code for copy to YAML files and will cause errors without the "PHP". Please revert changes to Cloud documentation for PHP command.
reverted for Cloud documentation
|
||
git add -A; git commit -m "Install Fastly"; git push origin <branch name> | ||
```bash | ||
git add -A; git commit -m "Install Fastly"; git push origin <branch name> |
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.
Would &&
be better here than ;
?
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.
yes
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.
Would && be better here than ;?
implemented
|
||
Sample result: | ||
|
||
```terminal |
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.
Is terminal
a correct alias for syntax highlight? I'm unable to find it in the linguist reference which is used by Github.
Maybe we should use bash
in such cases as well?
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.
We use bash
for commands because the CSS adds the $ to the line but it is not included when copying.
terminal
will work and it is used to show the output/results of a command. It will not include the $ at the start of the line.
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.
For all Cloud topics: Code blocks inside of steps need a 4-space indention with a blank line before and after the code block.
1. Replace <your Magento install dir> with <magento_root> regarding Donald Booth comment
1. Replace "php bin/magento" with "bin/magento" regarding Donald Booth comment
implemented Thank you, @hguthrie ! |
cronrun: | ||
spec: "* * * * *" | ||
cmd: "php bin/magento cron:run" | ||
cmd: "bin/magento cron:run" |
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.
These are YAML file snippets and need the PHP
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.
These are YAML file snippets and need the PHP
reverted
cronrun: | ||
spec: "* * * * *" | ||
cmd: "php bin/magento cron:run" | ||
cmd: "bin/magento cron:run" |
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 PHP belongs in the YAML snippet
|
||
```bash | ||
php bin/magento --version | ||
bin/magento --version |
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.
tested in Cloud, either way works
### 101.7.3 changes | ||
|
||
<!--- MAGECLOUD-782 -->* Magento no longer throws an error when only the default store issued. Previously, when only the default store is used, Magento threw the following error when running `php bin/magento magento-cloud:scd-dump`: | ||
<!--- MAGECLOUD-782 -->* Magento no longer throws an error when only the default store issued. Previously, when only the default store is used, Magento threw the following error when running `bin/magento magento-cloud:scd-dump`: |
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.
I wouldn't change old release notes.
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.
I wouldn't change old release notes.
ok. Reverted 😊
done |
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.
Cloud changes approved at this time.
@dobooth is there an update for this? |
Merge remote-tracking branch 'upstream/master' into format-bash # Conflicts: # guides/v2.1/architecture/security_intro.md # guides/v2.2/cloud/configure/setup-b2b.md
…into format-bash
@dobooth , could you please approve this PR ;) Many thanks! |
Oh sorry! Missed it. |
running tests |
Hi @atwixfirster, thank you for your contribution! |
Purpose of this PR
This PR adds bash syntax to command line examples.
Affected URLs
Thank you!