mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-15 05:53:00 +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
22 lines
638 B
Bash
22 lines
638 B
Bash
#!/bin/bash
|
|
set -ex
|
|
|
|
function get_hub_version() {
|
|
rm -f hub_version
|
|
V=$1
|
|
docker run --rm -v $PWD:/version -u $(id -u) -i $DOCKER_REPO:$DOCKER_TAG sh -c 'jupyterhub --version > /version/hub_version'
|
|
hub_xyz=$(cat hub_version)
|
|
split=( ${hub_xyz//./ } )
|
|
hub_xy="${split[0]}.${split[1]}"
|
|
# add .dev on hub_xy so it's 1.0.dev
|
|
if [[ ! -z "${split[3]:-}" ]]; then
|
|
hub_xy="${hub_xy}.${split[3]}"
|
|
fi
|
|
}
|
|
# tag e.g. 0.9 with main
|
|
get_hub_version
|
|
docker tag $DOCKER_REPO:$DOCKER_TAG $DOCKER_REPO:$hub_xy
|
|
docker push $DOCKER_REPO:$hub_xy
|
|
docker tag $DOCKER_REPO:$DOCKER_TAG $DOCKER_REPO:$hub_xyz
|
|
docker push $DOCKER_REPO:$hub_xyz
|