app-facebook-event-scraper/create_changelog.sh

22 lines
473 B
Bash
Raw Permalink Normal View History

2020-08-31 21:17:57 +02:00
#!/bin/bash
changelog_location="fastlane/metadata/android/en-US/changelogs"
2020-08-31 21:25:29 +02:00
count_txt=$(ls -r $changelog_location/*.txt | wc -l)
count_tag=$(git tag | wc -l)
2020-08-31 21:17:57 +02:00
if (( count_txt != count_tag )); then
echo "Tag count and txt-file count not matching."
exit 1
fi
echo "# Changelog" > CHANGELOG.md
2020-08-31 21:25:29 +02:00
for i in $(seq "$count_txt" -1 1)
2020-08-31 21:17:57 +02:00
do
2020-08-31 21:25:29 +02:00
tag=$(git tag | sed "$i!d")
2020-08-31 21:17:57 +02:00
echo "## $tag ($i)" >> CHANGELOG.md
2020-09-27 15:54:43 +02:00
awk 1 $changelog_location/"$i".txt >> CHANGELOG.md
2020-08-31 21:17:57 +02:00
done