Closed rgreinho closed 5 years ago
Thank you for the detailed report :100:
I will look into this perhaps later today, but latest on Thursday.
I just tried running it in a docker container, but I experienced the same issue:
$ docker run -it --rm -v $PWD:/usr/src/app pycalver:latest bump --no-fetch --patch
INFO - Old Version: 19.03.0
INFO - New Version: 19.03.1
INFO - git commit --file /tmp/tmpamdsdox_
Traceback (most recent call last):
File "/usr/local/bin/pycalver", line 11, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pycalver/__main__.py", line 272, in bump
_bump(cfg, new_version, allow_dirty)
File "/usr/local/lib/python3.7/site-packages/pycalver/__main__.py", line 215, in _bump
_vcs.commit('bump version to {0}'.format(new_version))
File "/usr/local/lib/python3.7/site-packages/pycalver/vcs.py", line 130, in commit
self('commit', env=env, path=tmp_file.name)
File "/usr/local/lib/python3.7/site-packages/pycalver/vcs.py", line 64, in __call__
output_data = sp.check_output(cmd_str.split(), env=env, stderr=sp.
File "/usr/local/lib/python3.7/subprocess.py", line 389, in check_output
**kwargs).stdout
File "/usr/local/lib/python3.7/subprocess.py", line 481, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['git', 'commit', '--file', '/tmp/tmpamdsdox_']' returned non-zero exit status 128.
Dockerfile:
FROM python:3.7.1-alpine
WORKDIR /usr/src/app
RUN apk add --update --no-cache git openssh-client \
&& pip install --no-cache-dir pycalver
ENTRYPOINT ["pycalver"]
Built with docker build -t pycalver .
.
So I think we can safely assume it is not an OS issue.
An idea may be to use git commit -m {my message in a str}
instead of using the temporary file.
The issue does not appear to be related to the use of the temporary file for the commit. Rather, I think the issue is that the commit is empty because no files have been added. Of course that shouldn't result in a stacktrace like it does, so I'll improve the error message and hopefully it should be clear how to proceed.
I hope your issue is resolved with v201903.0028
I was experimenting with
pycalver
before using it in my projects, but unfortunately I was not able to bump the version number, and got the following output:Extra info
Repro steps
Configuration file:
Environment: