Skip to content

Commit

Permalink
updated script to handle new Consul-k8s images
Browse files Browse the repository at this point in the history
  • Loading branch information
wilkermichael committed Feb 1, 2024
1 parent 4012c75 commit c656e88
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions control-plane/build-support/functions/10-util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -629,15 +629,16 @@ function update_version_helm {
full_consul_version="$5-$3"
full_consul_dataplane_version="$7-$3"
elif test "$3" == "dev"; then
full_version="$2-$3"
full_version="${2%.*}-$3"
full_version_k8s_for_chart_version="$2-$3"
# strip off the last minor patch version so that the consul image can be set to something like 1.16-dev. The image
# is produced by Consul every night
full_consul_version="${5%.*}-$3"
full_consul_dataplane_version="${7%.*}-$3"
fi

sed_i ${SED_EXT} -e "s/(imageK8S:.*\/consul-k8s-control-plane:)[^\"]*/imageK8S: $4${full_version}/g" "${vfile}"
sed_i ${SED_EXT} -e "s/(version:[[:space:]]*)[^\"]*/\1${full_version}/g" "${cfile}"
sed_i ${SED_EXT} -e "s/(version:[[:space:]]*)[^\"]*/\1${full_version_k8s_for_chart_version}/g" "${cfile}"
sed_i ${SED_EXT} -e "s/(appVersion:[[:space:]]*)[^\"]*/\1${full_consul_version}/g" "${cfile}"
sed_i ${SED_EXT} -e "s/(image:.*\/consul-k8s-control-plane:)[^\"]*/image: $4${full_version}/g" "${cfile}"

Expand Down

0 comments on commit c656e88

Please sign in to comment.