Skip to content

Commit ce6b47b

Browse files
committed
scripts: add a helper script to set image version tag
This is useful in release branches and CI where custom image for test deployments must be set. Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
1 parent 8363525 commit ce6b47b

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

scripts/set-version.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/sh
2+
#
3+
# Copyright 2019 Intel Corporation.
4+
#
5+
# SPDX-License-Identifier: Apache-2.0
6+
#
7+
# Invoke this script with a version as parameter
8+
# and it will update all hard-coded image versions
9+
# in the source code.
10+
#
11+
# Adapted from https://github.com/intel/pmem-csi/
12+
13+
if [ $# != 1 ] || [ "$1" = "?" ] || [ "$1" = "--help" ]; then
14+
echo "Usage: $0 <image version>" >&2
15+
exit 1
16+
fi
17+
18+
sed -i -e "s;\(^TAG?*=\|intel/crypto-perf:\|intel/intel-[^ ]*:\)[^ ]*;\1$1;g" $(git grep -l '^TAG?*=\|intel/crypto-perf:\|intel/intel-[^ ]*:' Makefile deployments)

0 commit comments

Comments
 (0)