Skip to content

Commit

Permalink
Fix path to VPA version file in CI scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
voelzmo committed Dec 13, 2023
1 parent 4a2f0b6 commit 38d4af9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .ci/read-vpa-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '"'
src_dir=$(readlink -f "$(dirname "${0}")/..")

cat ${src_dir}/vertical-pod-autoscaler/common/version.go | grep 'const VerticalPodAutoscalerVersion' | cut -d " " -f 4 | tr -d '"'
3 changes: 2 additions & 1 deletion .ci/write-vpa-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
sed -i s/'^\(const VerticalPodAutoscalerVersion = "\).*"'/\\1${new_version}'"'/ ${src_dir}/vertical-pod-autoscaler/common/version.go

0 comments on commit 38d4af9

Please sign in to comment.