Skip to content

Commit

Permalink
remove from doc/add.md when buildspec available
Browse files Browse the repository at this point in the history
  • Loading branch information
hboutemy committed Sep 22, 2024
1 parent 83345e4 commit cf3e781
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build-buildspec-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
if [[ $file == *.buildspec ]]; then
./rebuild.sh $file
bin/update-project-summary.sh "$(dirname $file)"
git add "$(dirname $file)"
git add "$(dirname $file)" doc/add.md
git commit -m "./rebuild.sh $file"
git push
fi
Expand Down
8 changes: 8 additions & 0 deletions bin/update-project-summary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,14 @@ do
else
echo "$row:x: | |" >> tmp/${projectReadme}
fi

# remove line from doc/add.md if it is listed there
if [ $(grep "$dir/${buildspec}" doc/add.md | wc -l) -eq 1 ]
then
mv doc/add.md doc/add.md.old
grep -v "$dir/${buildspec}" doc/add.md.old > doc/add.md
rm doc/add.md.old
fi
fi
# don't continue if it's the oldest version with buildspec
[[ "$oldestBuildspecVersion" == "$version" ]] && break
Expand Down

0 comments on commit cf3e781

Please sign in to comment.