One can use pip to install a specific tag:
pip install -e git+ssh://[email protected]/{usr}/{repo}.git@{tag}#egg={egg}
However, I can't seem to find a way to make it point to the latest release (which would be releases/latest), and not just to the HEAD of master. Is it at all possible?
One constraint, it has to use ssh.
If you are using python packages here is one way to do this:
setup.py
import setuptools
import urllib.request
deps = [
{
'name': 'gunicorn',
'url': 'github.com/benoitc/gunicorn',
},
]
for i in range(len(deps)):
tag_url = urllib.request.urlopen(f"https://{deps[i]['url']}/releases/latest").geturl()
latest_tag = tag_url.split('/')[-1]
deps[i] = f"{deps[i]['name']} @ git+ssh://{deps[i]['url']}@{latest_tag}"
setuptools.setup(
install_requires=deps,
)
And then install the package locally
python -m pip install .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With