forked from twilio/twilio-cli-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Shell script to execute update api definitions and changelog.
- Loading branch information
1 parent
525f817
commit c631fa8
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/sh | ||
echo "Copying api-definitions" | ||
cp -R ~/oai_definitions/json/. src/services/twilio-api/ | ||
echo "Running update changelog script" | ||
changeLog=$(node scripts/update-api-definitions.js) | ||
changeLog="${changeLog//'%'/'%25'}" | ||
changeLog="${changeLog//$'\n'/'%0A'}" | ||
changeLog="${changeLog//$'\r'/'%0D'}" | ||
echo "CHANGE_LOG=$changeLog" >> $GITHUB_ENV | ||
# echo "::set-output name=changeLog::$changeLog" | ||
versionType=$(node scripts/get-version-type.js) | ||
echo "Version type: $versionType" | ||
rm -rf OAI_CHANGES.md | ||
echo "Git configurations" | ||
git config --global user.email "lakshmiravali.rimmalapudi@gmail.com" | ||
git config --global user.name "lakshmiravali" | ||
git add . | ||
commitMessage='' | ||
if [ $versionType == 0 ] || [ $versionType == 1 ] | ||
then | ||
commitMessage='feat: Updated api definitions' | ||
elif [ $versionType == 2 ] | ||
then | ||
commitMessage='fix: Updated api definitions' | ||
else | ||
exit | ||
fi | ||
echo "Commit message:$commitMessage" | ||
git commit -m "$commitMessage" | ||
git push origin test_branch_actions |