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.
fix: Added changes in package.json and Updated scriot file
- Loading branch information
1 parent
09ba672
commit 749a316
Showing
3 changed files
with
56 additions
and
46 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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -3,11 +3,11 @@ 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" | ||
if [ "$changeLog" != '' ]; then | ||
changeLog="${changeLog//'%'/'%25'}" | ||
changeLog="${changeLog//$'\n'/'%0A'}" | ||
changeLog="${changeLog//$'\r'/'%0D'}" | ||
fi | ||
versionType=$(node scripts/get-version-type.js) | ||
echo "Version type: $versionType" | ||
rm -rf OAI_CHANGES.md | ||
|
@@ -16,17 +16,23 @@ git config --global user.email "[email protected]" | |
git config --global user.name "lakshmiravali" | ||
branch=$(git branch --show-current) | ||
echo "Current branch: $branch" | ||
git add . | ||
commitMessage='' | ||
if [ $versionType == 0 ] || [ $versionType == 1 ] | ||
then | ||
commitMessage='doc: Updated api definitions' | ||
elif [ $versionType == 2 ] | ||
then | ||
commitMessage='fix: Updated api definitions' | ||
git add -A | ||
if [ -n "$(git status --porcelain)" ]; then | ||
echo "There are changes to commit."; | ||
commitMessage='' | ||
if [ "$versionType" == 0 ] || [ "$versionType" == 1 ] | ||
then | ||
commitMessage='feat: Updated api definitions' | ||
elif [ "$versionType" == 2 ] | ||
then | ||
commitMessage='fix: Updated api definitions' | ||
else | ||
echo "Invalid versionType: $versionType"; | ||
exit | ||
fi | ||
echo "Commit message:$commitMessage" | ||
git commit -m "$commitMessage" | ||
git push origin "$branch" | ||
else | ||
exit | ||
echo "No OpenAPI changes to commit"; | ||
fi | ||
echo "Commit message:$commitMessage" | ||
git commit -m "$commitMessage" | ||
git push origin $branch |