Skip to content

Support multiple --config files #263

@stephenmathieson

Description

@stephenmathieson

I am using commit-and-tag-version in a monorepo. Each package in the monorepo has its own .versionrc.json file, which contains duplicated configuration (eg skip.tag=true, scripts.prerelease=...). Rather than needing to copy/paste this configuration into each package, it'd be nice if we could specify multiple config files and have their configuration merged together.

This could look something like:

packages/mypackage/package.json

{
  "scripts": {
    "release": "commit-and-tag-version -c ./.versionrc.json -c ../../.versionrc.json"
  }
}

packages/mypackage/.versionrc.json

{
  "path": ".",
  "tag-prefix": "mypackage@v",
  "releaseCommitMessageFormat": "chore(release): mypackage@{{currentTag}}"
}

.versionrc.json

{
  "scripts": {
    "prerelease": "./scripts/maybe-skip-release.sh"
  },
  "skip": {
    "tag": true
  }
}

It looks like implementing this would be reasonably simple, with minimal changes to lib/configuration.js. Is this something you'd be willing to support?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions