Build fails if no remotes
Opened this issue · 4 comments
jlsheehan commented
Thanks for your excellent plugin. When I start a new project I have local git repo and not yet created the remote repo but I can't do any build because this plugin fails the whole build if there are no remotes.
Attached stack trace, thanks again for excellent plugin.
$ pyb_ -t
Traceback (most recent call last):
File "C:\Users\<username>\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Users\<username>\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\<username>\Development\<projectname>\venv\Scripts\pyb_.exe\__main__.py", line 9, in <module>
File "c:\users\<username>\development\<projectname>\venv\lib\site-packages\pybuilder\cli.py", line 377, in main
exclude_all_optional=options.exclude_all_optional
File "c:\users\<username>\development\<projectname>\venv\lib\site-packages\pybuilder\reactor.py", line 108, in prepare_build
self.project_module = self.load_project_module(project_descriptor)
File "c:\users\<username>\development\<projectname>\venv\lib\site-packages\pybuilder\reactor.py", line 334, in load_project_module
return imp.load_source("build", project_descriptor)
File "C:\Users\<username>\AppData\Local\Programs\Python\Python37\lib\imp.py", line 171, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap>", line 696, in _load
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\Users\<username>\Development\<projectname>\build.py", line 9, in <module>
use_plugin('pypi:pybuilder_semver_git_tag')
File "c:\users\<username>\development\<projectname>\venv\lib\site-packages\pybuilder\core.py", line 218, in use_plugin
reactor.require_plugin(name, version, plugin_module_name)
File "c:\users\<username>\development\<projectname>\venv\lib\site-packages\pybuilder\reactor.py", line 74, in require_plugin
self.import_plugin(plugin, version, plugin_module_name)
File "c:\users\<username>\development\<projectname>\venv\lib\site-packages\pybuilder\reactor.py", line 199, in import_plugin
plugin_module = self.plugin_loader.load_plugin(self.project, plugin, version, plugin_module_name)
File "c:\users\<username>\development\<projectname>\venv\lib\site-packages\pybuilder\pluginloader.py", line 150, in load_plugin
return loader.load_plugin(project, name, version, plugin_module_name)
File "c:\users\<username>\development\<projectname>\venv\lib\site-packages\pybuilder\pluginloader.py", line 108, in load_plugin
return self._load_installed_plugin(thirdparty_plugin, name)
File "c:\users\<username>\development\<projectname>\venv\lib\site-packages\pybuilder\pluginloader.py", line 129, in _load_installed_plugin
plugin_module = _load_plugin(thirdparty_plugin, name)
File "c:\users\<username>\development\<projectname>\venv\lib\site-packages\pybuilder\pluginloader.py", line 199, in _load_plugin
__import__(plugin_module_name)
File "c:\users\<username>\development\<projectname>\venv\lib\site-packages\pybuilder_semver_git_tag\__init__.py", line 249, in <module>
Reactor.current_instance().project, Reactor.current_instance().logger)
File "c:\users\<username>\development\<projectname>\venv\lib\site-packages\pybuilder_semver_git_tag\__init__.py", line 237, in force_semver_git_tag_plugin
project.name = _get_repo_name(_get_repo_path(project))
File "c:\users\<username>\development\<projectname>\venv\lib\site-packages\pybuilder_semver_git_tag\__init__.py", line 116, in _get_repo_name
return get_name_from_git_url(remotes[0].url)
File "c:\users\<username>\development\<projectname>\venv\lib\site-packages\git\util.py", line 893, in __getitem__
return list.__getitem__(self, index)
IndexError: list index out of range
AlexeySanko commented
Hi, @jlsheehan .
Thank You for feedback!
Unfortunately, more than year ago I changed job and switched to Bazel. I will be happy if You have possibility to contribute. But I don't know when I will have time for working with this plugin.
jlsheehan commented
Sure I will try to fix it when I get time also.
Jeff
Sent from Mailspring (https://link.getmailspring.com/link/E3AAD717-0B8E-484C-903D-A2EA3E81B212@getmailspring.com/0?redirect=https%3A%2F%2Fgetmailspring.com%2F&recipient=cmVwbHkrQUJOWU1GVlRMU1pRS1ZBNE9LRTRRTjUzVU5URTVFVkJOSEhCMzJDRUY0QHJlcGx5LmdpdGh1Yi5jb20%3D), the best free email app for work
…On Oct 4 2019, at 2:45 am, Alexey Sanko ***@***.***> wrote:
Hi, @jlsheehan ***@***.***/1?redirect=https%3A%2F%2Fgithub.com%2Fjlsheehan&recipient=cmVwbHkrQUJOWU1GVlRMU1pRS1ZBNE9LRTRRTjUzVU5URTVFVkJOSEhCMzJDRUY0QHJlcGx5LmdpdGh1Yi5jb20%3D) .
Thank You for feedback!
Unfortunately, more than year ago I changed job and switched to Bazel. I will be happy if You have possibility to contribute. But I don't know when I will have time for working with this plugin.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub ***@***.***/2?redirect=https%3A%2F%2Fgithub.com%2FAlexeySanko%2Fpybuilder_semver_git_tag%2Fissues%2F9%3Femail_source%3Dnotifications%26email_token%3DABNYMFRDRFIT6QZAOTTSEWTQMYOT5A5CNFSM4I44HQ3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAI2N3Q%23issuecomment-538027758&recipient=cmVwbHkrQUJOWU1GVlRMU1pRS1ZBNE9LRTRRTjUzVU5URTVFVkJOSEhCMzJDRUY0QHJlcGx5LmdpdGh1Yi5jb20%3D), or mute the thread ***@***.***/3?redirect=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABNYMFQU5IXMRX2HEOCG34TQMYOT5ANCNFSM4I44HQ3A&recipient=cmVwbHkrQUJOWU1GVlRMU1pRS1ZBNE9LRTRRTjUzVU5URTVFVkJOSEhCMzJDRUY0QHJlcGx5LmdpdGh1Yi5jb20%3D).
AlexeySanko commented
Some problems with PyBuilder on Python3 :(
https://travis-ci.org/AlexeySanko/pybuilder_semver_git_tag
jlsheehan commented
It seems to be because coverage is 66% and version.py has no coverage, I'll see if I can fix it tonight...