Skip to content

Commit

Permalink
Revise update-version.sh (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
tingyu66 authored Jul 28, 2023
1 parent 73471f3 commit 6d73391
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 17 deletions.
20 changes: 9 additions & 11 deletions ci/release/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,14 @@ CURRENT_SHORT_TAG=${CURRENT_MAJOR}.${CURRENT_MINOR}
NEXT_MAJOR=$(echo $NEXT_FULL_TAG | awk '{split($0, a, "."); print a[1]}')
NEXT_MINOR=$(echo $NEXT_FULL_TAG | awk '{split($0, a, "."); print a[2]}')
NEXT_SHORT_TAG=${NEXT_MAJOR}.${NEXT_MINOR}
NEXT_UCX_PY_VERSION="$(curl -sL https://version.gpuci.io/rapids/${NEXT_SHORT_TAG})"
NEXT_UCX_PY_VERSION="$(curl -sL https://version.gpuci.io/rapids/${NEXT_SHORT_TAG}).*"

echo "Preparing release $CURRENT_TAG => $NEXT_FULL_TAG and short tag => $CURRENT_SHORT_TAG"
# Need to distutils-normalize the versions for some use cases
CURRENT_SHORT_TAG_PEP440=$(python -c "from setuptools.extern import packaging; print(packaging.version.Version('${CURRENT_SHORT_TAG}'))")
NEXT_SHORT_TAG_PEP440=$(python -c "from setuptools.extern import packaging; print(packaging.version.Version('${NEXT_SHORT_TAG}'))")
echo "current is ${CURRENT_SHORT_TAG_PEP440}, next is ${NEXT_SHORT_TAG_PEP440}"

echo "Preparing release $CURRENT_TAG => $NEXT_FULL_TAG"

# Inplace sed replace; workaround for Linux and Mac
function sed_runner() {
Expand All @@ -46,11 +51,7 @@ sed_runner 's/'"branch-.*\/RAPIDS.cmake"'/'"branch-${NEXT_SHORT_TAG}\/RAPIDS.cma
sed_runner 's/'"RAPIDS_VERSION \".*\")"'/'"RAPIDS_VERSION \"${NEXT_SHORT_TAG}\")"'/g' cpp/CMakeLists.txt

# Python CMakeLists updates
sed_runner 's/'"RAPIDS_VERSION .*)"'/'"RAPIDS_VERSION ${NEXT_FULL_TAG})"'/g' python/pylibwholegraph/CMakeLists.txt

# Python setup.py updates
sed_runner 's/'version=".*"'/'version="${NEXT_FULL_TAG}"'/g' python/pylibwholegraph/setup.py

sed_runner '/set(RAPIDS_VERSION/ s/".*"/'\"${NEXT_SHORT_TAG}\"'/g' python/pylibwholegraph/CMakeLists.txt

# RTD update
sed_runner 's/version = .*/version = '"'${NEXT_SHORT_TAG}'"'/g' docs/wholegraph/source/conf.py
Expand All @@ -62,9 +63,6 @@ sed_runner "s/__version__ = .*/__version__ = \"${NEXT_FULL_TAG}\"/g" python/pyli
# Python pyproject.toml updates
sed_runner "s/^version = .*/version = \"${NEXT_FULL_TAG}\"/g" python/pylibwholegraph/pyproject.toml

# Need to distutils-normalize the original version
NEXT_SHORT_TAG_PEP440=$(python -c "from setuptools.extern import packaging; print(packaging.version.Version('${NEXT_SHORT_TAG}'))")

DEPENDENCIES=(
libraft
libraft-headers
Expand All @@ -85,7 +83,7 @@ for DEP in "${DEPENDENCIES[@]}"; do
done

# Doxyfile update
sed_runner "s|PROJECT_NUMBER[[:space:]]*=.*|PROJECT_NUMBER=${NEXT_SHORT_TAG}|" cpp/Doxyfile
sed_runner "/^PROJECT_NUMBER/ s|=.*|= ${NEXT_SHORT_TAG}|" cpp/Doxyfile


# CI files
Expand Down
4 changes: 2 additions & 2 deletions conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ dependencies:
- graphviz
- ipykernel
- ipython
- libraft-headers==23.08.*
- librmm==23.08.*
- libraft-headers==23.8.*
- librmm==23.8.*
- nanobind>=0.2.0
- nbsphinx
- nccl
Expand Down
4 changes: 2 additions & 2 deletions conda/environments/all_cuda-120_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ dependencies:
- graphviz
- ipykernel
- ipython
- libraft-headers==23.08.*
- librmm==23.08.*
- libraft-headers==23.8.*
- librmm==23.8.*
- nanobind>=0.2.0
- nbsphinx
- nccl
Expand Down
4 changes: 2 additions & 2 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ dependencies:
common:
- output_types: [conda, requirements]
packages:
- libraft-headers==23.08.*
- librmm==23.08.*
- libraft-headers==23.8.*
- librmm==23.8.*
test_cpp:
common:
- output_types: [conda, requirements]
Expand Down

0 comments on commit 6d73391

Please sign in to comment.