Skip to content

Commit

Permalink
fix: Added changes in package.json and Updated scriot file
Browse files Browse the repository at this point in the history
  • Loading branch information
lakshmiravalir committed Aug 25, 2021
1 parent 09ba672 commit 749a316
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 46 deletions.
33 changes: 33 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,38 @@
},
"engines": {
"node": ">=10.12.0"
},
"release": {
"branches": [
"test_branch_actions",
{
"name": "beta",
"prerelease": true
}
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/changelog",
{
"changelogFile": "CHANGES.md"
}
],
[
"@semantic-release/npm",
{
"npmPublish": false
}
],
"@semantic-release/github",
[
"@semantic-release/git",
{
"assets": ["CHANGES.md", "package.json"],
"message": "chore(release): set `package.json` to ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
]
}
}
29 changes: 0 additions & 29 deletions release.config.js

This file was deleted.

40 changes: 23 additions & 17 deletions scripts/updateApiDefinitions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit 749a316

Please sign in to comment.