Skip to content

Commit 6254336

Browse files
committed
chore: script to update coder version in testdata
1 parent d9fbaaa commit 6254336

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

scripts/testdata_version.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
3+
# Check if a version argument is provided
4+
if [ "$#" -ne 1 ]; then
5+
echo "Usage: $0 <version_argument>"
6+
exit 1
7+
fi
8+
9+
VERSION_ARGUMENT=$1
10+
11+
# Find and replace the string in all .tf files in the ./testdata/ directory
12+
find ./testdata/ -type f -name "*.tf" -exec sed "s| coder = {| coder = {\n version = \"$VERSION_ARGUMENT\"|" {} +
13+
14+
echo "Replacement complete. Backup files have been removed."

0 commit comments

Comments
 (0)