-
Notifications
You must be signed in to change notification settings - Fork 675
DYN-8977 Create global.json dynamically #16266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,18 @@ jobs: | |
| with: | ||
| path: Dynamo | ||
| repository: DynamoDS/Dynamo | ||
| - name: Create global.json | ||
| run: | | ||
| $globalJson = @" | ||
| { | ||
| "projects": ["src", "test"], | ||
| "sdk": { | ||
| "version": "8.0.100", | ||
| "rollForward": "latestFeature" | ||
| } | ||
| } | ||
| "@ | ||
| $globalJson | Out-File -FilePath ${{ github.workspace }}\Dynamo\global.json -Encoding utf8 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. did the dotnet command not work for some reason?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It did, but I couldn't figure out how to add |
||
| - name: Setup dotnet | ||
| uses: actions/setup-dotnet@v4 | ||
| with: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,18 @@ jobs: | |
| with: | ||
| path: Dynamo | ||
| repository: DynamoDS/Dynamo | ||
| - name: Create global.json | ||
| run: | | ||
| $globalJson = @" | ||
| { | ||
| "projects": ["src", "test"], | ||
| "sdk": { | ||
| "version": "8.0.100", | ||
| "rollForward": "latestFeature" | ||
| } | ||
| } | ||
| "@ | ||
| $globalJson | Out-File -FilePath ${{ github.workspace }}\Dynamo\global.json -Encoding utf8 | ||
| - name: Setup dotnet | ||
| uses: actions/setup-dotnet@v4 | ||
| with: | ||
|
|
@@ -26,12 +38,9 @@ jobs: | |
| - name: Setup msbuild | ||
| uses: microsoft/setup-msbuild@v2 | ||
| - name: Install dependencies for windows runtime | ||
| run: | | ||
| dotnet restore ${{ github.workspace }}\Dynamo\src\Dynamo.All.sln /p:Configuration=Release --runtime=win-x64 | ||
| run: dotnet restore ${{ github.workspace }}\Dynamo\src\Dynamo.All.sln /p:Configuration=Release --runtime=win-x64 | ||
| - name: Build Dynamo with MSBuild | ||
| run: | | ||
| Write-Output "***Continue with the build, Good luck developer!***" | ||
| msbuild ${{ github.workspace }}\Dynamo\src\Dynamo.All.sln /p:Configuration=Release | ||
| run: msbuild ${{ github.workspace }}\Dynamo\src\Dynamo.All.sln /p:Configuration=Release | ||
| - name: Look for DynamoCLI.exe | ||
| run: | | ||
| Write-Output "***Locating DynamoCLI.exe!***" | ||
|
|
@@ -57,6 +66,18 @@ jobs: | |
| path: master | ||
| ref: master | ||
| repository: DynamoDS/Dynamo | ||
| - name: Create global.json | ||
| run: | | ||
| $globalJson = @" | ||
| { | ||
| "projects": ["src", "test"], | ||
| "sdk": { | ||
| "version": "8.0.100", | ||
| "rollForward": "latestFeature" | ||
| } | ||
| } | ||
| "@ | ||
| $globalJson | Out-File -FilePath ${{ github.workspace }}\master\global.json -Encoding utf8 | ||
| - name: Setup dotnet | ||
| uses: actions/setup-dotnet@v4 | ||
| with: | ||
|
|
@@ -66,12 +87,9 @@ jobs: | |
| - name: Setup msbuild | ||
| uses: microsoft/setup-msbuild@v2 | ||
| - name: Install dependencies for windows runtime | ||
| run: | | ||
| dotnet restore ${{ github.workspace }}\master\src\Dynamo.All.sln /p:Configuration=Release --runtime=win-x64 -p:DotNet=net8.0 | ||
| run: dotnet restore ${{ github.workspace }}\master\src\Dynamo.All.sln /p:Configuration=Release --runtime=win-x64 | ||
| - name: Build Dynamo with MSBuild | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @pinzart90 Correct me if I am wrong, I think we can remove it here as well, net8.0 is the default
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That is correct
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @avidit can you make that change, and then we can merge
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
| run: | | ||
| Write-Output "***Continue with the build, Good luck developer!***" | ||
| msbuild ${{ github.workspace }}\master\src\Dynamo.All.sln /p:Configuration=Release /p:DotNet=net8.0 | ||
| run: msbuild ${{ github.workspace }}\master\src\Dynamo.All.sln /p:Configuration=Release | ||
| - name: Look for DynamoCLI.exe | ||
| run: | | ||
| Write-Output "***Locating DynamoCLI.exe!***" | ||
|
|
||
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this do anything ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not see it mentioned in the docs https://learn.microsoft.com/en-us/dotnet/core/tools/global-json
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with projects array, global.json applies to all projects in the folders which avoids the need of adding it in different places.