diff --git a/.ci/read-vpa-version.sh b/.ci/read-vpa-version.sh index 09c5cb6b4de6..b144dbc1ee1c 100755 --- a/.ci/read-vpa-version.sh +++ b/.ci/read-vpa-version.sh @@ -14,4 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -cat ../vertical-pod-autoscaler/common/version.go | grep 'const VerticalPodAutoscalerVersion' | cut -d " " -f 4 | tr -d '"' \ No newline at end of file +src_dir=$(readlink -f "$(dirname "${0}")/..") + +cat ${src_dir}/vertical-pod-autoscaler/common/version.go | grep 'const VerticalPodAutoscalerVersion' | cut -d " " -f 4 | tr -d '"' \ No newline at end of file diff --git a/.ci/write-vpa-version.sh b/.ci/write-vpa-version.sh index f5fe4d3cd005..e6269935b1cb 100755 --- a/.ci/write-vpa-version.sh +++ b/.ci/write-vpa-version.sh @@ -14,5 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. +src_dir="$(readlink -f "$(dirname "${0}")/..")" new_version=$(cat -) -sed -i s/'^\(const VerticalPodAutoscalerVersion = "\).*"'/\\1${new_version}'"'/ vertical-pod-autoscaler/common/version.go \ No newline at end of file +sed -i s/'^\(const VerticalPodAutoscalerVersion = "\).*"'/\\1${new_version}'"'/ ${src_dir}/vertical-pod-autoscaler/common/version.go \ No newline at end of file