Skip to content

Commit

Permalink
fix: rename monorepo.readVersionFrom to monorepo.mainVersionFile (#350)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eunjae Lee authored Oct 20, 2019
1 parent a06660d commit 107255a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ Ship.js currently supports monorepo project(Independent versioning is not suppor
```js
module.exports = {
monorepo: {
readVersionFrom: "package.json", // or `lerna.json`, or whatever a json file you can read the latest `version` from.
mainVersionFile: "package.json", // or `lerna.json`, or whatever a json file you can read the latest `version` from.
packagesToBump: ["packages/*", "examples/*"],
packagesToPublish: ["packages/*"]
}
Expand Down
2 changes: 1 addition & 1 deletion packages/shipjs-lib/src/lib/config/defaultConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import shipJsVersion from '../../version';
export default {
remote: 'origin',
// monorepo: {
// readVersionFrom: 'package.json',
// mainVersionFile: 'package.json',
// packagesToBump: ['packages/*', 'examples/*'],
// packagesToPublish: ['packages/*'],
// },
Expand Down
4 changes: 2 additions & 2 deletions packages/shipjs/src/step/prepare/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export default ({ config, dir }) =>
const { mergeStrategy, monorepo, getTagName } = config;
const baseBranches = getBaseBranches({ mergeStrategy });
const currentVersion =
monorepo && monorepo.readVersionFrom
? getCurrentVersion(dir, monorepo.readVersionFrom)
monorepo && monorepo.mainVersionFile
? getCurrentVersion(dir, monorepo.mainVersionFile)
: getCurrentVersion(dir);
const currentTagName = getTagName({ version: currentVersion });
const result = validateBeforePrepare({
Expand Down
2 changes: 1 addition & 1 deletion ship.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const path = require("path");

module.exports = {
monorepo: {
readVersionFrom: "package.json",
mainVersionFile: "package.json",
packagesToBump: ["packages/*"],
packagesToPublish: ["packages/*"]
},
Expand Down

0 comments on commit 107255a

Please sign in to comment.