Skip to content

Commit c631fa8

Browse files
feat: Shell script to execute update api definitions and changelog.
1 parent 525f817 commit c631fa8

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

scripts/updateApiDefinitions.sh

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/sh
2+
echo "Copying api-definitions"
3+
cp -R ~/oai_definitions/json/. src/services/twilio-api/
4+
echo "Running update changelog script"
5+
changeLog=$(node scripts/update-api-definitions.js)
6+
changeLog="${changeLog//'%'/'%25'}"
7+
changeLog="${changeLog//$'\n'/'%0A'}"
8+
changeLog="${changeLog//$'\r'/'%0D'}"
9+
echo "CHANGE_LOG=$changeLog" >> $GITHUB_ENV
10+
# echo "::set-output name=changeLog::$changeLog"
11+
versionType=$(node scripts/get-version-type.js)
12+
echo "Version type: $versionType"
13+
rm -rf OAI_CHANGES.md
14+
echo "Git configurations"
15+
git config --global user.email "[email protected]"
16+
git config --global user.name "lakshmiravali"
17+
git add .
18+
commitMessage=''
19+
if [ $versionType == 0 ] || [ $versionType == 1 ]
20+
then
21+
commitMessage='feat: Updated api definitions'
22+
elif [ $versionType == 2 ]
23+
then
24+
commitMessage='fix: Updated api definitions'
25+
else
26+
exit
27+
fi
28+
echo "Commit message:$commitMessage"
29+
git commit -m "$commitMessage"
30+
git push origin test_branch_actions

0 commit comments

Comments
 (0)