Skip to content

Commit

Permalink
Update updateVersion.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jagankumar-egov authored Jan 23, 2024
1 parent 0f964fa commit f82c566
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/updateVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,15 @@ jobs:
# Increment the version manually
new_version=$(echo "$current_version" )
# Update the package.json file with the new version
jq --arg dep "$dependency" --arg new_version "$new_version" '.dependencies[$dep] = $new_version' "$DESTIN_JSON_FILE" > "$DESTIN_JSON_FILE.tmp" && mv "$DESTIN_JSON_FILE.tmp" "$DESTIN_JSON_FILE"
# Commit the updated package.json
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git checkout -b "$TARGET_BRANCH"
# Update the package.json file with the new version
jq --arg dep "$dependency" --arg new_version "$new_version" '.dependencies[$dep] = $new_version' "$DESTIN_JSON_FILE" > "$DESTIN_JSON_FILE.tmp" && mv "$DESTIN_JSON_FILE.tmp" "$DESTIN_JSON_FILE"
git add "$DESTIN_JSON_FILE"
git commit -m "Auto increment $dependency version to $new_version"
git push origin "$TARGET_BRANCH"
Expand Down

0 comments on commit f82c566

Please sign in to comment.