Skip to content

Commit b86d031

Browse files
authored
Merge pull request #250 from chaitanya1731/scripts
script: Added set-version.sh script to update the TAG version for the…
2 parents 90db6b4 + 52e1b2c commit b86d031

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

set-version.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/sh -eu
2+
#
3+
# Copyright 2024 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 devel versions
9+
# to the tag versions in the source code.
10+
#
11+
# Adapted from https://github.com/intel/intel-device-plugins-for-kubernetes/
12+
13+
if [ $# != 1 ] || [ "$1" = "?" ] || [ "$1" = "--help" ]; then
14+
echo "Please provide TAG version as an argument. Usage: $0 <tag_version>" >&2
15+
exit 1
16+
fi
17+
18+
devel_link="intel/intel-technology-enabling-for-openshift/main/"
19+
tag_link="intel/intel-technology-enabling-for-openshift/$1/"
20+
21+
files=$(git grep -lF $devel_link -- '*.md')
22+
23+
for file in $files; do
24+
sed -i -e "s|$devel_link|$tag_link|g" "$file";
25+
done

0 commit comments

Comments
 (0)