Skip to content

Commit

Permalink
Add package.json version check
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Schulte committed Dec 17, 2018
1 parent 0a8276b commit c0cc7a9
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .scripts/checkPackageJsonVersion.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { checkPackageJsonVersion } from "@ts-common/azure-js-dev-tools";

process.exitCode = checkPackageJsonVersion(__dirname);
16 changes: 16 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,19 @@ jobs:
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(Build.SourcesDirectory)/drop
- job: Check_PackageJson_Version_Number
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: Npm@1
displayName: 'npm install'
inputs:
command: custom
verbose: false
customCommand: install
- task: Npm@1
displayName: 'npm run check:packagejsonversion -- --azure-devops'
inputs:
command: custom
verbose: false
customCommand: run check:packagejsonversion -- --azure-devops
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"tslib": "^1.9.2"
},
"devDependencies": {
"@ts-common/azure-js-dev-tools": "^0.1.3",
"@ts-common/azure-js-dev-tools": "^0.4.9",
"@types/chai": "^4.1.4",
"@types/mocha": "^5.2.1",
"@types/node": "^10.9.4",
Expand Down Expand Up @@ -105,7 +105,8 @@
"prepack": "npm install && npm run build",
"publish-preview": "npm test && shx rm -rf dist/test && node ./.scripts/publish",
"local": "npm explore @ts-common/azure-js-dev-tools -- npm run local",
"latest": "npm explore @ts-common/azure-js-dev-tools -- npm run latest"
"latest": "npm explore @ts-common/azure-js-dev-tools -- npm run latest",
"check:packagejsonversion": "ts-node ./.scripts/checkPackageJsonVersion.ts"
},
"sideEffects": false
}

0 comments on commit c0cc7a9

Please sign in to comment.