Command `gitlab release` does not work without `--profile` option anymore
A bit contrived, but the program now crashes if I don't specify a profile with:
devtool gitlab release -vvd changelog.md
[WARNING][idiap_devtools][2023-06-21 15:34:47,648] No dev-profile given. There will be no dependencies version pinning. To enable pinning, set the --profile option.
!!!! DRY RUN MODE !!!!
No changes will be committed to GitLab.
[INFO][idiap_devtools][2023-06-21 15:34:47,806] Found GitLab package `software/auto-intersphinx' (id=5489)
[INFO][idiap_devtools][2023-06-21 15:34:47,806] Processing package software/auto-intersphinx to perform a patch release bump
[INFO][idiap_devtools][2023-06-21 15:34:47,936] Bumping version of software/auto-intersphinx to v1.0.3
Traceback (most recent call last):
File "/Users/andre/mamba/bin/devtool", line 10, in <module>
sys.exit(cli())
File "/Users/andre/mamba/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/Users/andre/mamba/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/Users/andre/mamba/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/andre/mamba/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/andre/mamba/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/andre/mamba/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/Users/andre/mamba/lib/python3.10/site-packages/idiap_devtools/scripts/gitlab/release.py", line 226, in release
profile=loaded_profile,
UnboundLocalError: local variable 'loaded_profile' referenced before assignment
This happens even if the default=...
profile on my configuration is set. The purpose of the default
was not having to specify a command-line option. So, if we now have to specify a command-line option, it is no longer optional. We should fix it one way or the other.