Skip to content

Commit

Permalink
Merge pull request saltstack-formulas#43 from myii/PR_auto-md-toc
Browse files Browse the repository at this point in the history
feat(toc): use `markdown-toc` directly to update inline
  • Loading branch information
myii authored Feb 23, 2019
2 parents c45ea67 + abcb6ef commit 2c23866
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ jobs:
- go get github.com/myii/maintainer
- maintainer contributor

# Update Tables of Content in the relevant `.md` files
- npm install markdown-toc -D
- markdown-toc -i CONTRIBUTING.md
# - markdown-toc -i README.md
- markdown-toc -i TOFS_pattern.md

# Install all dependencies required for `semantic-release`
- npm install @semantic-release/changelog@3 -D
- npm install @semantic-release/exec@3 -D
Expand Down
14 changes: 11 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
# How to contribute

This document will eventually outline all aspects of guidance to make your contributing experience a fruitful and enjoyable one.
What it already contains is information about _commit message formatting_ and how that directly affects the numerous automated processes that are used for this repo.

<table><tr><th>Table of Contents</th></tr><tr><td>
<!-- toc -->
<!-- tocstop -->
</td></tr></table>

## Commit message formatting

### Automation of multiple processes

This repo uses [`semantic-release`](https://github.com/semantic-release/semantic-release) for automating numerous processes such as bumping the version number appropriately, creating new tags/releases and updating the changelog.
This formula uses [`semantic-release`](https://github.com/semantic-release/semantic-release) for automating numerous processes such as bumping the version number appropriately, creating new tags/releases and updating the changelog.
The entire process relies on the structure of commit messages to determine the version bump, which is then used for the rest of the automation.

Full details are available in the upstream docs regarding the [Angular Commit Message Conventions](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines).
Expand All @@ -19,7 +27,7 @@ type(scope): subject
Besides the version bump, the changelog and release notes are formatted accordingly.
So based on the example above:

> ### Documentation
> <h3>Documentation</h3>
>
> * **contributing:** add commit message formatting instructions
Expand All @@ -29,7 +37,7 @@ So based on the example above:

### Linting commit messages in Travis CI

This repo uses [`commitlint`](https://github.com/conventional-changelog/commitlint) for checking commit messages during CI testing.
This formula uses [`commitlint`](https://github.com/conventional-changelog/commitlint) for checking commit messages during CI testing.
This ensures that they are in accordance with the `semantic-release` settings.

For more details about the default settings, refer back to the `commitlint` [reference rules](https://conventional-changelog.github.io/commitlint/#/reference-rules).
Expand Down
7 changes: 5 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ template-formula
A SaltStack formula that is empty. It has dummy content to help with a quick
start on a new formula and it serves as a style guide.

**NOTE**
.. contents:: **Table of Contents**

See the full `Salt Formulas installation and usage instructions
General notes
=============

See the full `SaltStack Formulas installation and usage instructions
<https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html>`_.

If you are interested in writing or contributing to formulas, please pay attention to the `Writing Formula Section
Expand Down
5 changes: 5 additions & 0 deletions TOFS_pattern.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ Modified by Daniel Dehennin <daniel.dehennin@baby-gnu.org>

All that follows is a proposal based on my experience with [Saltstack](http://www.saltstack.com/). The good thing of a piece of software like this is that you can "bend it" to suit your needs in many possible ways, and this is one of them. All the recommendations and thoughts are given "as it is" with no warranty of any type.

<table><tr><th>Table of Contents</th></tr><tr><td>
<!-- toc -->
<!-- tocstop -->
</td></tr></table>


## Usage of values in pillar vs templates in file_roots

Expand Down

0 comments on commit 2c23866

Please sign in to comment.