-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f6c6a4d
Showing
15 changed files
with
11,378 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Node.js | ||
node_modules/ | ||
|
||
# Build output | ||
/dist/ | ||
|
||
# Pack output | ||
*.tgz | ||
|
||
# Test output | ||
/coverage/ | ||
/junit.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CHANGELOG.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
singleQuote: true | ||
proseWrap: always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
MIT License | ||
|
||
Copyright (c) 2019 Jeffrey Principe | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
the Software, and to permit persons to whom the Software is furnished to do so, | ||
subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# commitlint-azure-pipelines-cli | ||
|
||
Lint relevant commits for a branch or Pull Request in [Azure Pipelines][] using | ||
[commitlint][] with no configuration needed. | ||
|
||
## Getting Started | ||
|
||
Add this package and commitlint to your dev dependencies: | ||
|
||
``` | ||
npm install --save-dev @commitlint/cli commitlint-azure-pipelines-cli | ||
``` | ||
|
||
Then, in your `azure-pipelines.yml` file, add a step to invoke it: | ||
|
||
```yml | ||
steps: | ||
# Other steps (e.g. install, setup) | ||
- script: ./node_modules/.bin/commitlint-azure-pipelines | ||
``` | ||
Alternatively, you can add a standalone job for running commitlint: | ||
```yml | ||
jobs: | ||
- job: commitlint | ||
pool: | ||
vmImage: 'ubuntu-16.04' | ||
steps: | ||
- task: NodeTool@0 | ||
inputs: | ||
versionSpec: 10.x | ||
- script: npm ci | ||
- script: ./node_modules/.bin/commitlint-azure-pipelines | ||
name: Lint commits | ||
``` | ||
## Compatibility | ||
This package is only tested against the latest Node.js LTS release. Make sure | ||
you select the latest LTS release for your commitlint step/job. This task is | ||
tested against all of the hosted operating systems (win, mac, linux). | ||
[azure pipelines]: https://azure.microsoft.com/en-us/services/devops/pipelines/ | ||
[commitlint]: https://github.com/conventional-changelog/commitlint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
variables: | ||
- group: semantic-release | ||
|
||
trigger: | ||
- master | ||
|
||
pr: | ||
- master | ||
|
||
jobs: | ||
- job: commitlint | ||
pool: | ||
vmImage: 'ubuntu-16.04' | ||
steps: | ||
- task: NodeTool@0 | ||
inputs: | ||
versionSpec: 10.x | ||
displayName: Use Node.js 10 | ||
- script: npm ci | ||
displayName: Install Dependencies | ||
- script: npm run build | ||
displayName: Build | ||
- script: | | ||
chmod a+x ./bin/run | ||
./bin/run | ||
workingDirectory: $(Build.SourcesDirectory) | ||
displayName: Lint Commits | ||
- job: Test | ||
strategy: | ||
matrix: | ||
linux: | ||
imageName: 'ubuntu-16.04' | ||
mac: | ||
imageName: 'macos-10.13' | ||
windows: | ||
imageName: 'vs2017-win2016' | ||
pool: | ||
vmImage: $(imageName) | ||
steps: | ||
- task: NodeTool@0 | ||
inputs: | ||
versionSpec: 10.x | ||
displayName: Use Node.js 10 | ||
- script: npm ci | ||
displayName: Install Dependencies | ||
- script: npm test | ||
displayName: Run Tests | ||
- task: PublishTestResults@2 | ||
condition: succeededOrFailed() | ||
inputs: | ||
testRunner: JUnit | ||
testResultsFiles: junit.xml | ||
- task: PublishCodeCoverageResults@1 | ||
inputs: | ||
codeCoverageTool: Cobertura | ||
summaryFileLocation: coverage/cobertura-coverage.xml | ||
reportDirectory: coverage | ||
|
||
- job: publish | ||
dependsOn: | ||
- commitlint | ||
- test | ||
pool: | ||
vmImage: 'ubuntu-16.04' | ||
condition: and(succeeded(), in(variables['Build.Reason'], 'Manual', 'IndividualCI', 'BatchedCI'), eq(variables['Build.SourceBranch'], 'refs/heads/master')) | ||
steps: | ||
- task: NodeTool@0 | ||
inputs: | ||
versionSpec: 10.x | ||
displayName: Use Node.js 10 | ||
- script: npm ci | ||
displayName: Install Dependencies | ||
- script: npm run release | ||
env: | ||
GH_TOKEN: $(GH_TOKEN) | ||
NPM_TOKEN: $(NPM_TOKEN) | ||
displayName: Publish to NPM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env node | ||
|
||
require('../dist').default().catch(err => { | ||
console.log(err); | ||
process.exit(1); | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@echo off | ||
|
||
node "%~dp0\run" %* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
declare module '@commitlint/cli'; |
Oops, something went wrong.