Skip to content

Commit

Permalink
Adding lerna version to have the same version.
Browse files Browse the repository at this point in the history
  • Loading branch information
offbeatful committed May 3, 2020
1 parent ba17eb6 commit 26d0786
Show file tree
Hide file tree
Showing 5 changed files with 2,552 additions and 58 deletions.
5 changes: 5 additions & 0 deletions .azure-pipelines/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ stages:
displayName: "Install"
inputs:
ProjectDirectory: $(Build.SourcesDirectory)
- task: Yarn@3
displayName: "Update version"
inputs:
ProjectDirectory: $(Build.SourcesDirectory)
arguments: "run version $(Build.BuildNumber)"
- template: pack-template.yml
parameters:
package: $(eslintConfig)
Expand Down
5 changes: 0 additions & 5 deletions .azure-pipelines/pack-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ parameters:
type: string
default: ""
steps:
- task: Yarn@3
displayName: "${{ parameters.package }} - Update version"
inputs:
projectDirectory: "$(Build.SourcesDirectory)/packages/${{ parameters.package }}"
arguments: "version --new-version $(Build.BuildNumber) --no-git-tag-version"
- task: Yarn@3
displayName: "${{ parameters.package }} - Pack"
condition:
Expand Down
6 changes: 6 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"npmClient": "yarn",
"useWorkspaces": true,
"packages": ["packages/*"],
"version": "1.0.0"
}
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
"name": "mocoding-react-app-monorepo",
"private": true,
"devDependencies": {
"typescript": "^3.8.3",
"redux-thunk": "^2.3.0"
"lerna": "^3.20.2",
"redux-thunk": "^2.3.0",
"typescript": "^3.8.3"
},
"workspaces": [
"packages/*"
Expand All @@ -13,6 +14,7 @@
},
"scripts": {
"cli": "moapp",
"version": "lerna version --no-git-tag-version --yes",
"build": "yarn workspace @mocoding/react-app build"
},
"eslintConfig": {
Expand Down
Loading

0 comments on commit 26d0786

Please sign in to comment.