Skip to content

Commit b58377d

Browse files
authored
Merge branch 'master' into bugfix/globaltool
2 parents f0a0e47 + 5efdb2c commit b58377d

File tree

2 files changed

+20
-25
lines changed

2 files changed

+20
-25
lines changed

README.md

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,33 +18,15 @@ The only thing we need to install is [.Net Core SDK](https://www.microsoft.com/n
1818
### .Net Core 2.1 Global Tool
1919

2020
.Net Core 2.1 introduces the concept of global tools meaning that you can install `dotnet-script` using nothing but the .NET CLI.
21+
To do this, you will need [.Net Core SDK 2.1.300 preview1](https://www.microsoft.com/net/download/dotnet-core/sdk-2.1.300-preview1).
2122

2223
```shell
23-
dotnet tool install -g dotnet-script
24-
25-
You can invoke the tool using the following command: dotnet-script
26-
Tool 'dotnet-script' (version '0.20.0') was successfully installed.
24+
dotnet install tool -g dotnet-script
2725
```
2826

2927
The advantage of this approach is that you can use the same command for installation across all platforms.
3028

31-
> In order to use the global tool you need [.Net Core SDK 2.1.300 preview2](https://www.microsoft.com/net/download/dotnet-core/sdk-2.1.300-preview2) or higher. It also works with [.Net Core SDK 2.1.300 preview1](https://www.microsoft.com/net/download/dotnet-core/sdk-2.1.300-preview1), but that one had a different syntax: `dotnet install tool -g dotnet-script` and is now deprecated.
32-
33-
.NET Core SDK also supports viewing a list of installed tools and their uninstallation.
34-
35-
```shell
36-
dotnet tool list -g
37-
38-
Package Id Version Commands
39-
---------------------------------------------
40-
dotnet-script 0.20.0 dotnet-script
41-
```
42-
43-
```shell
44-
dotnet tool uninstall dotnet-script -g
45-
46-
Tool 'dotnet-script' (version '0.20.0') was successfully uninstalled.
47-
```
29+
> ⚠️ [.Net Core SDK 2.1.300 preview2](https://www.microsoft.com/net/download/dotnet-core/sdk-2.1.300-preview2) is already out. Unfortunately, it [doesn't support .NET Core 2.0 tools](https://github.com/dotnet/cli/issues/9073#issuecomment-382020484) (dotnet-script uses .NET Core 2.0 runtime to execute your scripts) so is not compatible with dotnet-script at the moment.
4830
4931
### Windows
5032

build/Dockerfile

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
1-
FROM microsoft/dotnet:2.0.0-sdk
1+
FROM microsoft/dotnet:2.0.0-sdk as builder
22
COPY . /dotnet-script
33
WORKDIR /dotnet-script
44

5+
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
6+
RUN apt update
7+
RUN apt install apt-transport-https
8+
RUN echo "deb https://download.mono-project.com/repo/debian stable-stretch main" | tee /etc/apt/sources.list.d/mono-official-stable.list
9+
10+
RUN apt update
11+
RUN apt install mono-devel -y
12+
RUN apt install nuget -y
13+
514
RUN dotnet restore
6-
RUN dotnet test src/Dotnet.Script.Tests/Dotnet.Script.Tests.csproj
7-
RUN dotnet publish src/Dotnet.Script/Dotnet.Script.csproj -f netcoreapp2.0
15+
RUN dotnet test src/Dotnet.Script.Tests/Dotnet.Script.Tests.csproj
16+
RUN dotnet publish -c Release src/Dotnet.Script/Dotnet.Script.csproj -f netcoreapp2.0
17+
18+
FROM microsoft/dotnet:2.0.0-sdk
19+
20+
COPY --from=builder /dotnet-script/src/Dotnet.Script/bin/Release/netcoreapp2.0/publish/ /dotnet-script/
821

922
WORKDIR /scripts
1023

11-
ENTRYPOINT ["dotnet", "/dotnet-script/src/Dotnet.Script/bin/Debug/netcoreapp2.0/publish/dotnet-script.dll"]
24+
ENTRYPOINT ["dotnet", "/dotnet-script/dotnet-script.dll"]

0 commit comments

Comments
 (0)