googleapis / googleapis/release-please
Should "exclude-paths" allow excluding specific files.
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 588
- Avg merge
- 12h 16m
- Merged PRs (30d)
- 7
Description
- 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
Contributor guide
Assessment
This issue has not been assessed yet.