mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-17 15:03:02 +00:00

- update references to default branch name in docs, workflows - use HEAD in github urls, which always works regardless of default branch name - fix petstore URLs since the old petstore links seem to have stopped working to merge, in order: - [x] approve this PR - [x] rename the default branch to main in settings - [x] merge this PR Related tangent: I've been using [this git default-branch](https://github.com/minrk/git-stuff/blob/main/bin/git-default-branch) to help with my aliases and friends working with repos with different branch names. Signed-off-by: Min RK <benjaminrk@gmail.com>
22 lines
591 B
Python
22 lines
591 B
Python
#!/usr/bin/env python
|
|
import os
|
|
from subprocess import check_call
|
|
import sys
|
|
|
|
V = os.environ['JUPYTERHUB_VERSION']
|
|
|
|
pip_install = [
|
|
sys.executable, '-m', 'pip', 'install', '--no-cache', '--upgrade',
|
|
'--upgrade-strategy', 'only-if-needed',
|
|
]
|
|
if V in {'main', 'HEAD'}:
|
|
req = 'https://github.com/jupyterhub/jupyterhub/archive/HEAD.tar.gz'
|
|
else:
|
|
version_info = [ int(part) for part in V.split('.') ]
|
|
version_info[-1] += 1
|
|
upper_bound = '.'.join(map(str, version_info))
|
|
vs = '>=%s,<%s' % (V, upper_bound)
|
|
req = 'jupyterhub%s' % vs
|
|
|
|
check_call(pip_install + [req])
|