Skip to content

Commit

Permalink
logging
Browse files Browse the repository at this point in the history
  • Loading branch information
credfeto committed Mar 19, 2024
1 parent 2c0212c commit e2a23cb
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/dotnet-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,22 +64,27 @@ jobs:
- name: "Update global.json to latest version"
if: ${{env.DOTNET_VERSION}} < ${{steps.latest-dotnet-version.outputs.LATEST_RELEASE_VERSION}}
shell: bash
working-directory: src
run: |
echo "Should update to ${{steps.latest-dotnet-version.outputs.LATEST_RELEASE_VERSION}}"
mv "src/global.json" "src/global.json.tmp";
jq --arg v "$NEW_DOTNET_VERSION" '.version = $v' < "src/global.json.tmp" > "src/global.json";
[ -f "src/global.json.tmp" ] && rm -f "src/global.json.tmp"
cat "src/global.json"
mv "global.json" "global.json.tmp";
jq --arg v "$NEW_DOTNET_VERSION" '.version = $v' < "src/global.json.tmp" > "global.json";
[ -f "global.json.tmp" ] && rm -f "global.json.tmp"
cat "global.json"
env:
NEW_DOTNET_VERSION: ${{steps.latest-dotnet-version.outputs.LATEST_RELEASE_VERSION}}

- name: "Push"
if: ${{env.DOTNET_VERSION}} < ${{steps.latest-dotnet-version.outputs.LATEST_RELEASE_VERSION}}
shell: bash
working-directory: src
run: |
git config --global user.name 'fun-version[bot]'
git config --global user.email '[email protected]'
git add "src/global.json" && git commit -m "SDK - Update DotNet SDK to $NEW_DOTNET_VERSION" && git push --set-upstream origin "depends/dotnet/$NEW_DOTNET_VERSION"
git diff
git add "src/global.json"
git commit -m "SDK - Update DotNet SDK to $NEW_DOTNET_VERSION"
git push --set-upstream origin "depends/dotnet/$NEW_DOTNET_VERSION"
# - name: "Commit changes to new branch"
# if: ${{env.DOTNET_VERSION}} < ${{steps.latest-dotnet-version.outputs.LATEST_RELEASE_VERSION}}
Expand Down

0 comments on commit e2a23cb

Please sign in to comment.