Skip to content

Commit

Permalink
upd script
Browse files Browse the repository at this point in the history
  • Loading branch information
semarche-kaltura committed Dec 11, 2023
1 parent 33ba685 commit f10dc81
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/update_dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,12 @@ jobs:
latestVersion=$versionValue
fi
# Get the current version from package.json
local currentVersion=$(jq -r ".dependencies.\"$packageName\"" package.json)
# Update the package.json file only if the version has changed
if [[ "$(jq -r ".dependencies.\"$packageName\"" package.json)" != "$latestVersion" ]]; then
echo "Update $packageName from $(jq -r ".dependencies.\"$packageName\"" package.json) to version $latestVersion"
if [[ "$currentVersion" != "$latestVersion" ]]; then
echo "Update $packageName from $currentVersion to version $latestVersion"
yarn add $packageName@$latestVersion --silent
echo "COMMIT_REQUIRED=true" >> $GITHUB_ENV
else
Expand Down

0 comments on commit f10dc81

Please sign in to comment.