Skip to content

Commit

Permalink
add debug info in update script
Browse files Browse the repository at this point in the history
  • Loading branch information
ivvist committed Dec 3, 2024
1 parent cbbb7d0 commit bec0cc2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/updateConfig.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

branch=$(git symbolic-ref --short HEAD)
echo "Branch: $branch"

stack="dev"
if [[ $branch =~ "release" ]]; then
Expand All @@ -9,6 +10,7 @@ fi
if [[ $branch =~ "rc" ]]; then
stack="rc"
fi
echo "Stack: $stack"

stackfile="./airs-config-sync/stacks/$stack/stack.yml"
if [ ! -f "$stackfile" ]
Expand Down Expand Up @@ -38,11 +40,16 @@ packfound=0
while read -r line; do
i=$((i+1))
if [ $packfound -eq 0 ]; then
echo "Pack: $pack"
if [[ $line =~ "pack: $pack" ]]; then
packfound=1
fi
else
echo "Line: $line"
echo "Updtag: $updtag"
if [[ $line =~ "$updtag:" ]]; then
echo "Stack file: $stackfile"
echo "Tag: $$tagvalue"
sed -i "${i}s/.*$updtag.*/ $reptag: $tagvalue/" ${stackfile}
break
fi
Expand Down

0 comments on commit bec0cc2

Please sign in to comment.