Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] [Monorepo] Add a config attribute to set if a global tag should be generated #259

Closed
Wassim-AB opened this issue Feb 10, 2023 · 2 comments · Fixed by #264
Closed
Assignees
Labels
bug Something isn't working

Comments

@Wassim-AB
Copy link

Hello,

I have a GitHub repository on which I store Helm Charts and I'm trying to use Cocogitto to manage my Chart's versions.
I made a public repository on which I reproduced my configuration to illustrate the issue I face :
https://github.com/Wassim-AB/cog-test

I have two Helm Charts, Jenkins and Thumbor, that I created in separated commits respectively with the feat(jenkins) and the feat(thumbor) prefixes.

Then, I added the Cocogitto configuration file using a chore commit. Because my repository is only supposed to store the Helm Charts, I set the public_api attribute of my packages to false since it doesn't make sense for my repository to have a global tag.

I then executed the cog bump --auto --dry-run command to see what tags Cocogitto would create, but instead I got this error message :

Error: failed to bump version
cause: No conventional commit found to bump current version.
    Only feature, bug fix and breaking change commits will trigger an automatic bump.

However, when I remove the public_api=false attribute of one of my packages, I get this :

jenkins-0.1.0
thumbor-0.1.0
0.1.0

My supposition is that Cocogitto won't bump packages if they all have the public_api=false attribute, but it doesn't always make sense for a Monorepo to have a global version since sometimes you just store packages that are related in terms of purpose but not in terms of dependencies.

Is this behavior desired or is it a bug ?

Thank you in advance for your time !
Wassim.

Related feature: #232

@Wassim-AB Wassim-AB added the bug Something isn't working label Feb 10, 2023
@oknozor
Copy link
Collaborator

oknozor commented Feb 10, 2023

Hello @Wassim-AB,

My supposition is that Cocogitto won't bump packages if they all have the public_api=false attribute

That's not exactly how it works. Packages with public_api = false will be bumped but they won't be taken into account in the global tag bump.

it doesn't always make sense for a Monorepo to have a global version

100% agree here, I started with this behavior as the default one, but we really need a config flag to set whether or not a global tag should be generated. If you decide to not generate a global tag then public_api will be useless.

I'll implement this asap, probably next week.

Thanks

@oknozor oknozor changed the title [BUG] [Monorepo] No bumps if packages are all set to public_api=false [FEATURE] [Monorepo] Add a config attribute to set if a global tag should be generated Feb 10, 2023
@Wassim-AB
Copy link
Author

Hello @oknozor,

Thank you for taking this into consideration ! :)

oknozor added a commit that referenced this issue Feb 18, 2023
* feat(monorepo): add config opt to disable global global-tag-opt

* refactor: use builder pattern for hook run options

* chore: remove codesee

* chore: add andre161292 to contributors list

Closes #259
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants