Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add markdown linting #1202

Merged
merged 1 commit into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .azure/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
npm install
displayName: 'Install dependencies'
- pwsh: |
npm run lint:check && npm run format:check
npm run lint:check && npm run format:check && npm run mdlint:check
displayName: 'Check code formatting'
- pwsh: |
npm run build:tools
Expand Down
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# http://editorconfig.org
# https://editorconfig.org
root = true

[*]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
npm install
name: Install dependencies
- run: |
npm run lint:check && npm run format:check
npm run lint:check && npm run format:check && npm run mdlint:check
name: Check code formatting
- run: |
npm run build:tools
Expand Down
10 changes: 10 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
MD033:
allowed_elements:
- details
- summary
- b
- i
MD013: false

MD041:
level: 1
4 changes: 3 additions & 1 deletion dist/azure/overview.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Versioning when using Git, solved. GitVersion looks at your Git history and works out the [semantic version](http://semver.org) of the commit being built.
# GitTools bundle for Azure Pipelines

Versioning when using Git, solved. GitVersion looks at your Git history and works out the [semantic version](https://semver.org) of the commit being built.

It works with most branching strategies but has been designed mainly around GitFlow and GitHubFlow (pull request workflow). The calculated version numbers can then be accessed through variables such as `$(GitVersion.FullSemVer)` and `$(GitVersion.SemVer)`. It is also very configurable to allow it to work with most release workflows!

Expand Down
4 changes: 3 additions & 1 deletion docs/cloning.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
In order for the gitversion to properly work you need to clone the repository with the entire history:
# Cloning

In order for the GitVersion to properly work you need to clone the repository with the entire history:

```yaml
# GitHub Actions syntax
Expand Down
6 changes: 6 additions & 0 deletions docs/examples/azure/gitreleasemanager/setup.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Setup GitReleaseManager Task (gitreleasemanager/setup) Usage Examples

Find out how to use the **gitreleasemanager/setup** task using the examples below.

> The examples use version _2.0.1_ of the GitReleaseManager Setup task. It is recommended to use the latest released version in your own workflows.

## Inputs

The Setup GitReleaseManager action accepts the following inputs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,13 @@ The Execute GitVersion task creates the following job-scoped variables and multi
- commitsSinceVersionSourcePadded (since 5.2.0, removed in 6.0.0)
- uncommittedChanges (since 5.5.0)
- commitDate

---

## Execution Examples

### Example 1

<details>
<summary>Calculate the version for the build.</summary>

Expand All @@ -121,20 +123,23 @@ steps:
- task: gitversion/execute@2.0.1
displayName: Determine Version
```

</details>

### Example 2

<details>
<summary>Calculate the version for the build using a config file with the default name **GitVersion.yml**.</summary>
<summary>Calculate the version for the build using a config file with the default name <b>GitVersion.yml</b>.</summary>

```yaml
steps:
# gitversion/setup@2.0.1 task omitted for brevity.

- task: gitversion/execute@2.0.1
- task: gitversion/execute@2.0.1
displayName: Determine Version
inputs:
useConfigFile: true

```

Example contents of **GitVersion.yml**:
Expand All @@ -147,12 +152,13 @@ branches:
pull-request:
tag: pr
```

</details>

### Example 3

<details>
<summary>Calculate the version for the build using a config file named **VersionConfig.yml** in the root of the working folder.</summary>
<summary>Calculate the version for the build using a config file named <b>VersionConfig.yml</b> in the root of the working folder.</summary>

```yaml
steps:
Expand All @@ -164,12 +170,13 @@ steps:
useConfigFile: true
configFilePath: 'VersionConfig.yml'
```

</details>

### Example 4

<details>
<summary>Show the effective configuration for GitVersion by running the **/showConfig** command (passed as an additional argument).</summary>
<summary>Show the effective configuration for GitVersion by running the <b>/showConfig</b> command (passed as an additional argument).</summary>

```yaml
steps:
Expand All @@ -180,6 +187,7 @@ steps:
inputs:
additionalArguments: '/showConfig'
```

</details>

### Example 5
Expand All @@ -197,6 +205,7 @@ steps:
disableCache: true
disableNormalization: true
```

</details>

### Example 6
Expand All @@ -213,6 +222,7 @@ steps:
inputs:
updateAssemblyInfo: true
```

</details>

### Example 7
Expand All @@ -231,17 +241,20 @@ steps:
update-build-number=false
next-version=2.0.1
```

</details>

## Output usage

The outputs can be accessed using the syntax `$(<id>.<outputName>)` or `$(<id>.GitVersion_<OutputName>)`, where `<id>` is the ID assigned to the step that calls the action, by subsequent steps later in the same job.
The outputs can be accessed using the syntax `$(<id>.<outputName>)` or `$(<id>.GitVersion_<OutputName>)`,
where `<id>` is the ID assigned to the step that calls the action, by subsequent steps later in the same job.

The action also creates environment variables of the form `$(<outputName>)` or `$(GitVersion_<OutputName>)` for use by other steps in the same job.

The multi-job output variables can be accessed across jobs and stages, in both conditions and variables.

**GitVersion also automatically updates the pre-defined Build variable `Build.BuildNumber`.** You can disable the default behavior by setting the `update-build-number` to `false` in the configuration file or by using the `overrideConfig` input.
**GitVersion also automatically updates the pre-defined Build variable `Build.BuildNumber`.**
You can disable the default behavior by setting the `update-build-number` to `false` in the configuration file or by using the `overrideConfig` input.

### Example 8

Expand Down Expand Up @@ -310,9 +323,11 @@ jobs:
env:
myvar_GitVersion_FullSemVer: $(version_step.GitVersion_FullSemVer)
```

</details>

### Example 9

<details>
<summary>Calculate the version for the build and use the output in a subsequent job.</summary>

Expand Down Expand Up @@ -396,9 +411,11 @@ jobs:
env:
localvar_GitVersion_FullSemVer: $(myvar_GitVersion_FullSemVer)
```

</details>

### Example 10

<details>
<summary>Calculate the version for the build and use the output in a subsequent stage.</summary>

Expand Down Expand Up @@ -489,4 +506,5 @@ stages:
env:
localvar_GitVersion_FullSemVer: $(myvar_GitVersion_FullSemVer)
```

</details>
4 changes: 2 additions & 2 deletions docs/examples/azure/gitversion/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Note: You need to run the Setup step before the Execute step, otherwise the Exec

## Setup GitVersion (gitversion/setup)

- [Usage examples](setup/usage-examples.md)
- [Usage examples](setup.md)

## Execute GitVersion (gitversion/execute)

- [Usage examples](execute/usage-examples.md)
- [Usage examples](execute.md)
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Find out how to use the **gitversion/setup** task using the examples below.

> The examples use version _2.0.1_ of the GitVersion Execute task. It is recommended to use the latest released version in your own workflows.
> The examples use version _2.0.1_ of the GitVersion Setup task. It is recommended to use the latest released version in your own workflows.

## Inputs

Expand Down
6 changes: 6 additions & 0 deletions docs/examples/github/gitreleasemanager/setup.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Setup GitReleaseManager Action (gitreleasemanager/setup) Usage Examples

Find out how to use the **gitreleasemanager/setup** action using the examples below.

> The examples use version _2.0.1_ of the GitReleaseManager Setup action. It is recommended to use the latest released version in your own workflows.

## Inputs

The Setup GitReleaseManager action accepts the following inputs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ The Execute GitVersion action creates the following outputs:
- commitsSinceVersionSourcePadded (since 5.2.0, removed in 6.0.0)
- uncommittedChanges (since 5.5.0)
- commitDate

---

## Execution Examples
Expand All @@ -124,12 +125,13 @@ steps:
- name: Determine Version
uses: gittools/actions/gitversion/execute@v2.0.1
```

</details>

### Example 2

<details>
<summary>Calculate the version for the build using a config file with the default name **GitVersion.yml**.</summary>
<summary>Calculate the version for the build using a config file with the default name <b>GitVersion.yml</b>.</summary>

```yaml
steps:
Expand All @@ -149,12 +151,13 @@ branches:
pull-request:
tag: pr
```

</details>

### Example 3

<details>
<summary>Calculate the version for the build using a config file named **VersionConfig.yml** in the root of the working folder.</summary>
<summary>Calculate the version for the build using a config file named <b>VersionConfig.yml</b> in the root of the working folder.</summary>

```yaml
steps:
Expand All @@ -166,12 +169,13 @@ steps:
useConfigFile: true
configFilePath: VersionConfig.yml
```

</details>

### Example 4

<details>
<summary>Show the effective configuration for GitVersion by running the **/showConfig** command (passed as an additional argument).</summary>
<summary>Show the effective configuration for GitVersion by running the <b>/showConfig</b> command (passed as an additional argument).</summary>

```yaml
steps:
Expand All @@ -183,6 +187,7 @@ steps:
useConfigFile: true
additionalArguments: '/showConfig'
```

</details>

### Example 5
Expand All @@ -200,6 +205,7 @@ steps:
disableCache: true
disableNormalization: true
```

</details>

### Example 6
Expand All @@ -216,6 +222,7 @@ steps:
with:
updateAssemblyInfo: true
```

</details>

### Example 7
Expand All @@ -234,11 +241,13 @@ steps:
update-build-number=false
next-version=2.0.1
```

</details>

## Output usage

The outputs can be accessed using the syntax `${{ steps.<id>.outputs.<outputName> }}` or `${{ steps.<id>.outputs.GitVersion_<OutputName> }}`, where `<id>` is the ID assigned to the step that calls the action, by subsequent steps later in the same job.
The outputs can be accessed using the syntax `${{ steps.<id>.outputs.<outputName> }}` or `${{ steps.<id>.outputs.GitVersion_<OutputName> }}`,
where `<id>` is the ID assigned to the step that calls the action, by subsequent steps later in the same job.

The action also creates environment variables of the form `${{ env.<outputName> }}` or `${{ env.GitVersion_<OutputName> }}` for use by other steps in the same job.

Expand Down Expand Up @@ -323,6 +332,7 @@ jobs:
env:
myvar_GitVersion_FullSemVer: ${{ steps.version_step.outputs.GitVersion_FullSemVer }}
```

</details>

### Example 9
Expand Down Expand Up @@ -468,4 +478,5 @@ jobs:
name: Use direct output from previous job (bash - outputs without prefix)
shell: bash
```

</details>
4 changes: 2 additions & 2 deletions docs/examples/github/gitversion/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Note: You need to run the Setup step before the Execute step, otherwise the Exec

## Setup GitVersion (gitversion/setup)

- [Usage examples](setup/usage-examples.md)
- [Usage examples](setup.md)

## Execute GitVersion (gitversion/execute)

- [Usage examples](execute/usage-examples.md)
- [Usage examples](execute.md)
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Find out how to use the **gitversion/setup** action using the examples below.

> The examples use version _2.0.1_ of the GitVersion Execute action. It is recommended to use the latest released version in your own workflows.
> The examples use version _2.0.1_ of the GitVersion Setup action. It is recommended to use the latest released version in your own workflows.

## Inputs

Expand Down
2 changes: 2 additions & 0 deletions docs/versions.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Versions and Compatibility

| GitTools/actions | GitVersion | GitReleaseManager |
|------------------|------------------|--------------------|
| v1.x | `>=5.2.0 <6.1.0` | `>=0.10.0 <0.18.0` |
Expand Down
2 changes: 1 addition & 1 deletion envs/gitversion/execute/github.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
GITHUB_WORKSPACE=.
RUNNER_TEMP=./.test/temp
RUNNER_TOOL_CACHE=./.test/tools
GITVERSION_PATH=./.test/tools/GitVersion.Tool/6.10.0
GITVERSION_PATH=./.test/tools/GitVersion.Tool/6.0.0
Loading