Skip to content
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

Makes github install dotnet from global.json #234

Merged
merged 2 commits into from
Mar 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'
- name: Use .NET Core 5.0 SDK
# Not specifying a version will attempt to install via global.json
- name: Use .NET Core global.json
uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x'

- name: Build
if: runner.os != 'Windows'
Expand Down
9 changes: 4 additions & 5 deletions Content/Console/.github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'
- name: Use .NET Core 5.0 SDK
# Not specifying a version will attempt to install via global.json
- name: Use .NET Core global.json
uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x'


- name: Build
if: runner.os != 'Windows'
run: |
chmod +x ./build.sh
chmod +x ./build.sh
./build.sh
env:
# Work around https://github.com/actions/setup-dotnet/issues/29
Expand Down
9 changes: 4 additions & 5 deletions Content/Library/.github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'
- name: Use .NET Core 5.0 SDK
# Not specifying a version will attempt to install via global.json
- name: Use .NET Core global.json
uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x'


- name: Build
if: runner.os != 'Windows'
run: |
chmod +x ./build.sh
chmod +x ./build.sh
./build.sh
env:
# Work around https://github.com/actions/setup-dotnet/issues/29
Expand Down
5 changes: 5 additions & 0 deletions tests/MiniScaffold.Tests/Tests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ module Tests =

Dotnet.New.cmd (fun opt -> { opt with WorkingDirectory = directory}) newArgs.ToStartInfo

let copyGlobalJson (directory : IO.DirectoryInfo) =
let globalJson = IO.Path.Join(__SOURCE_DIRECTORY__, "../../global.json")
let destination = IO.Path.Join(directory.FullName, "global.json")
IO.File.Copy(globalJson, destination)

let projectStructureAsserts = [
Assert.``CHANGELOG exists``
Expand Down Expand Up @@ -254,6 +258,7 @@ module Tests =

] |> Seq.map(fun (args, additionalAsserts) -> testCase args <| fun _ ->
use d = Disposables.DisposableDirectory.Create()
copyGlobalJson d.DirectoryInfo
showTemplateHelp <| Some d.Directory

runTemplate d.Directory args
Expand Down