#!/bin/bash

# for the develop branch this script bumps the Tensile version and hash and the rocBLAS version

OLD_TENSILE_VERSION="TENSILE_VERSION 4.44.0"
NEW_TENSILE_VERSION="TENSILE_VERSION 4.44.0"

OLD_TENSILE_HASH="7126604cd7ff65bd9eb7d458830e67fb15d78cac"
NEW_TENSILE_HASH="32c3cadb0ed68e3471ab48810a20e3282d30c279"

OLD_ROCBLAS_VERSION="5.0.0"
NEW_ROCBLAS_VERSION="5.1.0"

OLD_SO_VERSION="rocblas_SOVERSION 5.0"
NEW_SO_VERSION="rocblas_SOVERSION 5.1"

OLD_HIPBLASLT_VERSION="HIPBLASLT_VERSION 0.13"
NEW_HIPBLASLT_VERSION="HIPBLASLT_VERSION 0.15"

sed -i "s/${OLD_TENSILE_VERSION}/${NEW_TENSILE_VERSION}/g" CMakeLists.txt

sed -i "s/${OLD_TENSILE_HASH}/${NEW_TENSILE_HASH}/g" tensile_tag.txt

sed -i "s/${OLD_ROCBLAS_VERSION}/${NEW_ROCBLAS_VERSION}/g" CMakeLists.txt

sed -i "s/${OLD_SO_VERSION}/${NEW_SO_VERSION}/g" library/CMakeLists.txt

sed -i "s/${OLD_HIPBLASLT_VERSION}/${NEW_HIPBLASLT_VERSION}/g" CMakeLists.txt
