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

Config environment variables are not respected when cliff.toml is not found #777

Closed
1 task done
marsom opened this issue Jul 31, 2024 · 5 comments · Fixed by #783
Closed
1 task done

Config environment variables are not respected when cliff.toml is not found #777

marsom opened this issue Jul 31, 2024 · 5 comments · Fixed by #783
Assignees
Labels
bug Something isn't working

Comments

@marsom
Copy link

marsom commented Jul 31, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Description of the bug

Environment variable GIT_CLIFF__BUMP__INITIAL_TAG is not respected by git-cliff --bumped-version

I have projects with are versionn with a v-Prefix i.e. v0.2.0 and some with 0.2.0. most projects are with v-Perfix, i tried to set the initial to to e.g. v0.2.0 hand hopped that the intial tag would be v0.2.0.

Steps To Reproduce

mkdir upstream
cd upstream
git init
git switch --create main
echo a > text.txt
git add text.txt
git commit -m "fix: test"
cd ..
git clone upstream cloned
cd cloned

OK: i expect 0.1.0

git-cliff --bumped-version
 WARN  git_cliff > "cliff.toml" is not found, using the default configuration.
 WARN  git_cliff_core::release > No releases found, using 0.1.0 as the next version.
0.1.0

NOK: i expect 0.2.0

GIT_CLIFF__BUMP__INITIAL_TAG=0.2.0 git-cliff --bumped-version
 WARN  git_cliff > "cliff.toml" is not found, using the default configuration.
 WARN  git_cliff_core::release > No releases found, using 0.1.0 as the next version.
0.1.0

NOK: i expect v0.2.0

GIT_CLIFF__BUMP__INITIAL_TAG=v0.2.0 git-cliff --bumped-version
 WARN  git_cliff > "cliff.toml" is not found, using the default configuration.
 WARN  git_cliff_core::release > No releases found, using 0.1.0 as the next version.
0.1.0

Project with have tags alreay work perfektly, only new projects are not ok

Expected behavior

GIT_CLIFF__BUMP__INITIAL_TAG env varialbe should be respected by git-cliff --bumped-version

Screenshots / Logs

No response

Software information

  • Operating system: linux
  • Rust version: -
  • Project version: 2.4.0

Additional context

No response

@marsom marsom added the bug Something isn't working label Jul 31, 2024
Copy link

welcome bot commented Jul 31, 2024

Thanks for opening your first issue at git-cliff! Be sure to follow the issue template! ⛰️

@marsom
Copy link
Author

marsom commented Jul 31, 2024

if I add a cliff.toml in the repository then the varialbe is respected, but not with the default in place

@orhun orhun changed the title Environment variable GIT_CLIFF__BUMP__INITIAL_TAG and git-cliff --bumped-version does not work Config environment variables are not respected when cliff.toml is not found Aug 4, 2024
@orhun
Copy link
Owner

orhun commented Aug 4, 2024

#783 potentially fixes this, are you able to test it locally? 😊

@marsom
Copy link
Author

marsom commented Aug 5, 2024

Im currently on vacation. Ill will test it out when im back

@orhun
Copy link
Owner

orhun commented Aug 6, 2024

Sure, I will merge it then, it will most likely work 👍🏼

@orhun orhun closed this as completed in #783 Aug 6, 2024
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