Should "exclude-paths" allow excluding specific files.

Author: kinyoklionCreated Apr 10, 2024Updated Aug 31, 2026
Labelstype: questionpriority: p3
  • What you're trying to do

I am converting a repository that uses release-please into a monorepo. This repository has a root package and I would not like for root configuration to version the package.

https://github.com/launchdarkly/go-server-sdk

{
  "separate-pull-requests": true,
  "include-component-in-tag" : true,
  "packages" : {
    "." : {
      "release-type" : "go",
      "bump-minor-pre-major" : true,
      "versioning" : "default",
      "include-component-in-tag" : false,
      "bootstrap-sha" : "25fcfa1ba34928c6dc6d1ee29f4504b7614fa55c",
      "extra-files" : [
        "internal/version.go"
      ],
      "exclude-paths": ["ldotel"]
    },
    "ldotel" : {
      "release-type" : "go",
      "tag-separator": "/",
      "versioning" : "default",
      "extra-files" : [
        "package_info.go"
      ]
    }
  }
}

What I would like to do is include things like "Makefile" in the "exclude-paths" for the root package.

  • What code you've already tried

I did try it, and it doesn't work. Paths here specifically effectively means directory.

The reason this doesn't work is because in commit-exclude.ts there is this function:

  private isRelevant(file: string, path: string) {
    return path === ROOT_PROJECT_PATH || file.indexOf(`${path}/`) === 0;
  }

It requires that path appear in the file's path with a /.

Something like:

  private isRelevant(file: string, path: string) {
    return path === ROOT_PROJECT_PATH || file.indexOf(`${path}/`) === 0 || file === path;
  }

Makes it function as expected and I can omit root files from a root package.

The question is, what is the desired behavior here? If it is to allow files, then I can make a PR for it. If not I will work around it by being careful to omit root files from releasable changes.

Thank you, Ryan

Source: googleapis/release-please