-
Notifications
You must be signed in to change notification settings - Fork 236
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
New version 8.x.x ignores GL_TOKEN #659
Comments
I solved my problem. What helped me was generating a default config file with semantic-release generate-config -f toml --pyproject >> pyproject.toml I merged these with my custom variables. Here is the configuration that works for me with the current Gitlab version: [tool.semantic_release]
assets = []
commit_message = "{version}\n\nAutomatically generated by python-semantic-release"
commit_parser = "angular"
logging_use_named_masks = false
major_on_zero = true
tag_format = "v{version}"
version_source = "tag"
commit_version_number = "true"
branch = "main"
version_variable = ".version:__version__"
[tool.semantic_release.branches.main]
match = "(main)"
prerelease = false
prerelease_token = "rc"
[tool.semantic_release.changelog]
template_dir = "templates"
changelog_file = "CHANGELOG.md"
exclude_commit_patterns = []
[tool.semantic_release.changelog.environment]
block_start_string = "{%"
block_end_string = "%}"
variable_start_string = "{{"
variable_end_string = "}}"
comment_start_string = "{#"
comment_end_string = "#}"
trim_blocks = false
lstrip_blocks = false
newline_sequence = "\n"
keep_trailing_newline = false
extensions = []
autoescape = true
[tool.semantic_release.commit_author]
env = "GIT_COMMIT_AUTHOR"
default = "semantic-release <semantic-release>"
[tool.semantic_release.commit_parser_options]
allowed_tags = ["build", "chore", "ci", "docs", "feat", "fix", "perf", "style", "refactor", "test"]
minor_tags = ["feat"]
patch_tags = ["fix", "perf"]
[tool.semantic_release.remote]
name = "origin"
type = "gitlab"
ignore_token_for_push = false
hvcs = "gitlab"
hvcs_domain = "gitlab.hrz.tu-chemnitz.de"
hvcs_api_domain = "gitlab.hrz.tu-chemnitz.de/api/v4"
[tool.semantic_release.remote.token]
env = "GL_TOKEN"
[tool.semantic_release.publish]
dist_glob_patterns = []
upload_to_vcs_release = false
upload_to_pypi = false
build_command = false
upload_to_repository = false ..and this is the corresponding Gitlab CI(skip the parts that are not relevant to you)
What was difficult to me was a) reading the python-semantic-release documentation, it seems inclomplete, particularly regarding the Gitlab configuration and b) identifying deprecated configuration variables. For instance,
It is also unclear to me why so many sections in Importantly, this is not meant to be a ranting! I really, really appreciate all the work that is going on in python-semantic-release. I just hope I can contribute to identify issues with the documentation, for better onboarding of people just starting with the tool. |
Hey @Sieboldianus 👋 Glad you were able to get up and running - but thank you for a) leaving such a detailed description of how you were able to resolve the issue and b) for highlighting your pain points 🥇 Definitely room to improve on the documentation - if you find anything else that seems missing, unclear or wrong, please don't hesitate to point it out! I've put together #665 and #666 for the documentation issues you've highlighted here 🙏 |
Hi @bernardcooke53, of course, glad I could contribute at least a bit here. I will see if I can create a PR with a minimal Gitlab CI Guide. I've been using python-semantic-release with Gitlab CI since 3-4 years and it worked flawlessly. There was one other piece that left me clueless while migrating from 7 to 8, perhaps you know better where to put this: There's now a new category "Unknown" showing up in my releases. I often have commits that are "dirty", i.e. 20x Otherwise, 8.x.x works like 7.x.x before now, really happy 👍 I will jump in those issues and see if I can add more details later. Thank you for picking this up. [Edit] For anyone looking.. I've cleaned up my Click
I think the following lines are also not necessary any more and can be removed (but I haven't tested):
|
The problem
I had a working pyproject.toml for automatic versioning in CI:
(I added
env = "GL_TOKEN"
per the new docs)This does not work anymore. I get the following result in CI:
Expected behavior
Semantic-release should pickup Gitlab, not Github as HVCS.
Environment
I tested this locally, and get the same reuslts:
Output
pip freeze
The text was updated successfully, but these errors were encountered: