Closed
Description
The problem
I had a working pyproject.toml for automatic versioning in CI:
[tool.semantic_release]
version_variable = ".version:__version__"
upload_to_pypi = "false"
build_command = "false"
branch = "main"
version_source = "tag"
commit_version_number = "true"
upload_to_repository = "false"
hvcs = "gitlab"
hvcs_domain = "gitlab.hrz.tu-chemnitz.de"
hvcs_api_domain = "gitlab.hrz.tu-chemnitz.de/api/v4"
env = "GL_TOKEN"
(I added env = "GL_TOKEN"
per the new docs)
This does not work anymore. I get the following result in CI:
if [ -z ${GL_TOKEN+x} ]; then echo "GL_TOKEN is unset"; else echo "GL_TOKEN is set"; fi
GL_TOKEN is set
$ semantic-release version
[12:06:14] WARNING [semantic_release.cli.config] WARNING config.py:331
config.from_raw_config: the token for the
remote VCS is configured as stored in the
GH_TOKEN environment variable, but it is empty
Expected behavior
Semantic-release should pickup Gitlab, not Github as HVCS.
Environment
I tested this locally, and get the same reuslts:
semantic-release --noop -v version
Output
semantic-release --noop -v version
🛡 You are running in no-operation mode, because the '--noop' flag was supplied
[14:08:39] INFO [semantic_release.cli.util] INFO util.load_raw_config_file: Loading configuration from pyproject.toml util.py:84
INFO [semantic_release.cli.config] INFO config.select_branch_options: Using group 'main' options, as '(main|master)' matches 'main' config.py:228
INFO [semantic_release.version.algorithm] INFO algorithm.tags_and_versions: found 16 previous tags algorithm.py:56
INFO [semantic_release.version.algorithm] INFO algorithm.next_version: Found 16 full releases (excluding prereleases) algorithm.py:246
INFO [semantic_release.version.algorithm] INFO algorithm.next_version: The last full release was 0.9.4, tagged as 'v0.9.4' algorithm.py:268
INFO [semantic_release.version.algorithm] INFO algorithm.bfs: found latest version in branch history: '0.9.4' (5d8e7cd) algorithm.py:92
INFO [semantic_release.version.algorithm] INFO algorithm._bfs_for_latest_version_in_history: the latest version in this branch's history is 0.9.4 algorithm.py:111
INFO [semantic_release.version.algorithm] INFO algorithm.next_version: The last full version in this branch's history was 0.9.4 algorithm.py:292
INFO [semantic_release.version.algorithm] INFO algorithm.next_version: The type of the next release release is: minor algorithm.py:369
0.10.0
INFO [semantic_release.version.algorithm] INFO algorithm.tags_and_versions: found 16 previous tags algorithm.py:56
The next version is: 0.10.0! 🚀
🛡 semantic-release 'noop' mode is enabled! would have updated versions in the following paths:
🛡 semantic-release 'noop' mode is enabled! would have run the build_command false
🛡 semantic-release 'noop' mode is enabled!
would have run:
git add
git commit -m "0.10.0
Automatically generated by python-semantic-release"
INFO [semantic_release.version.algorithm] INFO algorithm.tags_and_versions: found 16 previous tags algorithm.py:56
[14:08:40] INFO [semantic_release.cli.commands.version] INFO version.version: Path 'templates' not found, using default changelog template version.py:386
🛡 semantic-release 'noop' mode is enabled! would have written your changelog to CHANGELOG.md
🛡 semantic-release 'noop' mode is enabled!
would have run:
git add CHANGELOG.md
INFO [semantic_release.cli.commands.version] INFO version.version: No local changes to add to any commit, skipping version.py:447
🛡 semantic-release 'noop' mode is enabled!
would have run:
git tag -a v0.10.0 -m "v0.10.0"
🛡 semantic-release 'noop' mode is enabled!
would have run:
git push https://****@github.com/ad/test.git main
git push --tags https://****@github.com/ad/test.git main
🛡 semantic-release 'noop' mode is enabled! would have created a release for the tag 'v0.10.0'
🛡 semantic-release 'noop' mode is enabled! would have uploaded the following assets: []
INFO [semantic_release.cli.github_actions_output] INFO github_actions_output.write_if_possible: not writing GitHub Actions output, as no file specified github_actions_output.py:70
python --version
> Python 3.8.12
pip --version
> pip 21.3.1
semantic-release --version
> semantic-release, version 8.0.3
pip freeze
bleach==4.1.0
build==0.10.0
certifi==2021.10.8
cffi==1.15.0
charset-normalizer==2.0.10
click==8.0.3
click-log==0.3.2
colorama==0.4.4
cryptography==36.0.1
docutils==0.18.1
dotty-dict==1.3.0
gitdb==4.0.9
GitPython==3.1.26
idna==3.3
importlib-metadata==4.10.1
importlib-resources==5.7.0
invoke==1.6.0
jeepney==0.7.1
Jinja2==3.1.2
keyring==23.5.0
markdown-it-py==3.0.0
MarkupSafe==2.1.3
mdurl==0.1.2
packaging==21.3
pkginfo==1.8.2
pycparser==2.21
pydantic==1.10.12
Pygments==2.15.1
pyparsing==3.0.6
pyproject_hooks==1.0.0
python-gitlab==2.10.1
python-semantic-release==8.0.3
readme-renderer==32.0
requests==2.27.1
requests-toolbelt==0.9.1
rfc3986==2.0.0
rich==13.4.2
SecretStorage==3.3.1
semver==2.13.0
setuptools-scm==6.4.1
shellingham==1.5.0.post1
six==1.16.0
smmap==5.0.0
tomli==2.0.0
tomlkit==0.10.2
tqdm==4.62.3
twine==3.7.1
typing_extensions==4.7.1
urllib3==1.26.8
webencodings==0.5.1
zipp==3.7.0
Metadata
Metadata
Assignees
Labels
Something isn't working properlySomething isn't working properly