Skip to content

Commit

Permalink
fix: Added condition to check changeLog.md file exist or not
Browse files Browse the repository at this point in the history
  • Loading branch information
lakshmiravalir authored Aug 28, 2021
1 parent b98c93c commit 7a9ba55
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions scripts/updateApiDefinitions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,19 @@ echo "Copying api-definitions"
cp -R ~/oai_definitions/json/. src/services/twilio-api/
echo "Running update changelog script"
node scripts/update-api-definitions.js
changeLog=$(cat changeLog.md)
rm -rf changeLog.md
if [ "$changeLog" != '' ]; then
changeLog="${changeLog//'%'/'%25'}"
changeLog="${changeLog//$'\n'/'%0A'}"
changeLog="${changeLog//$'\r'/'%0D'}"
changeLog=''
versionType=-1
if [ -f changeLog.md ]; then
changeLog=$(cat changeLog.md)
rm -rf changeLog.md
if [ "$changeLog" != '' ]; then
changeLog="${changeLog//'%'/'%25'}"
changeLog="${changeLog//$'\n'/'%0A'}"
changeLog="${changeLog//$'\r'/'%0D'}"
versionType=$(node scripts/get-version-type.js | tail -n -1)
fi
fi
echo "Changelog: $changeLog"
versionType=$(node scripts/get-version-type.js | tail -n -1)
echo "Version type: $versionType"
rm -rf OAI_CHANGES.md
echo "Git configurations"
Expand Down

0 comments on commit 7a9ba55

Please sign in to comment.