Skip to content

Commit

Permalink
Use quotes in version.yaml example
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Towers committed Sep 11, 2020
1 parent 4d42d58 commit 5543b25
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions plugin-updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,32 +53,32 @@ In the example above the **Acme.Blog** plugin will not be updated until the **Ac

The **version.yaml** file, called the *Plugin version file*, contains the version comments and refers to database scripts in the correct order. Please read the [Database structure](../database/structure) article for information about the migration files. This file is required if you're going to submit the plugin to the [Marketplace](http://octobercms.com/help/site/marketplace). Here is an example of a plugin version file:

1.0.1: First version
1.0.2: Second version
1.0.1: "First version"
1.0.2: "Second version"
1.0.3:
- Third version
- which has a lot of changes
- including this one
1.1.0: !!! Important update
- "Third version"
- "which has a lot of changes"
- "including this one"
1.1.0: "!!! Important update"
1.1.1:
- Update with a migration and seed
- and here's the migration
- "Update with a migration and seed"
- "and here's the migration"
- create_tables.php
- and here's the seed
- "and here's the seed"
- seed_the_database.php

> **Note:** `version.yaml` files support having multiple text entries per version as the change log description. You can have as many update messages as you want, migration files can be listed in any position too.
As you can see above, there should be a key that represents the version number followed by the update message, which is either a string or an array containing update messages. For updates that refer to migration or seeding files, lines that are script file names can be placed in any position. An example of a comment with no associated update files:

1.0.1: A single comment that uses no update scripts.
1.0.1: "A single comment that uses no update scripts."

<a name="important-updates"></a>
### Important updates

Sometimes a plugin needs to introduce features that will break websites already using the plugin. If an update comment in the **version.yaml** file begins with three exclamation marks (`!!!`) then it will be considered *Important* and will require the user to confirm before updating. An example of an important update comment:

1.1.0: !!! This is an important update that contains breaking changes.
1.1.0: "!!! This is an important update that contains breaking changes."

When the system detects an important update it will provide three options to proceed:

Expand All @@ -94,7 +94,7 @@ Confirming the comment will update the plugin as usual, or if the comment is ski
As previously described, updates also define when [migration and seed files](../database/structure) should be applied. An update line with a comment and updates:

1.1.1:
- This update will execute the two scripts below.
- "This update will execute the two scripts below."
- some_upgrade_file.php
- some_seeding_file.php

Expand Down

0 comments on commit 5543b25

Please sign in to comment.