Skip to content

Commit

Permalink
deploy: Add update_image.sh
Browse files Browse the repository at this point in the history
Signed-off-by: Sheng Yang <[email protected]>
  • Loading branch information
yasker committed Sep 25, 2019
1 parent af1a80a commit 1fbff89
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions deploy/update_image.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

set -e

base="${GOPATH}/src/github.com/rancher/local-path-provisioner"
files=`find ${base}/deploy/ |grep yaml |sort`

project="rancher\/local-path-provisioner"
latest=`cat ${base}/bin/latest_image`
echo latest image ${latest}

escaped_image=${latest//\//\\\/}

for f in $files
do
sed -i "s/image\:\ ${project}:.*/image\:\ ${escaped_image}/g" $f
sed -i "s/-\ ${project}:.*/-\ ${escaped_image}/g" $f
done

0 comments on commit 1fbff89

Please sign in to comment.