#!/bin/bash

# For the develop branch, bump hipblas version and rocblas/rocsolver dependency versions

OLD_HIPBLAS_VERSION="3.1.0"
NEW_HIPBLAS_VERSION="3.2.0"

OLD_MINIMUM_ROCBLAS_VERSION="5.1.0"
NEW_MINIMUM_ROCBLAS_VERSION="5.2.0"

OLD_MINIMUM_ROCSOLVER_VERSION="3.31.0"
NEW_MINIMUM_ROCSOLVER_VERSION="3.32.0"

OLD_MINIMUM_HIPBLAS_COMMON_VERSION="1.3.0"
NEW_MINIMUM_HIPBLAS_COMMON_VERSION="1.4.0"

OLD_SO_VERSION="hipblas_SOVERSION 3.1"
NEW_SO_VERSION="hipblas_SOVERSION 3.2"

sed -i "s/${OLD_HIPBLAS_VERSION}/${NEW_HIPBLAS_VERSION}/g" CMakeLists.txt
sed -i "s/${OLD_MINIMUM_ROCBLAS_VERSION}/${NEW_MINIMUM_ROCBLAS_VERSION}/g" CMakeLists.txt
sed -i "s/${OLD_MINIMUM_ROCSOLVER_VERSION}/${NEW_MINIMUM_ROCSOLVER_VERSION}/g" CMakeLists.txt
sed -i "s/${OLD_MINIMUM_HIPBLAS_COMMON_VERSION}/${NEW_MINIMUM_HIPBLAS_COMMON_VERSION}/g" CMakeLists.txt
sed -i "s/${OLD_SO_VERSION}/${NEW_SO_VERSION}/g" library/CMakeLists.txt
