Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4dc751d
commit bc8a2f6
Showing
5 changed files
with
26 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,22 @@ | ||
FROM hexletbasics/base-image:latest | ||
|
||
ENV DOTNET_CLI_TELEMETRY_OPTOUT 1 | ||
RUN apt-get update && apt-get install -yq mono-devel | ||
|
||
RUN wget https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb && \ | ||
dpkg -i packages-microsoft-prod.deb && \ | ||
rm packages-microsoft-prod.deb | ||
RUN apt-get update && apt-get install -y dotnet-sdk-5.0 | ||
ARG SCRIPCS_VERSION=0.17.1 | ||
|
||
WORKDIR /exercises-csharp | ||
ENV PATH=/exercises-csharp/bin:$PATH | ||
RUN wget -q https://github.com/scriptcs/scriptcs/archive/refs/tags/v${SCRIPCS_VERSION}.tar.gz \ | ||
&& tar -xzf v${SCRIPCS_VERSION}.tar.gz \ | ||
&& rm v${SCRIPCS_VERSION}.tar.gz | ||
|
||
RUN dotnet tool install -g JetBrains.ReSharper.GlobalTools | ||
RUN dotnet tool install -g dotnet-script | ||
RUN cd scriptcs-${SCRIPCS_VERSION} && ./build.sh | ||
ENV PATH=/scriptcs-${SCRIPCS_VERSION}/artifacts/Release/bin:$PATH | ||
|
||
ENV PATH=/root/.dotnet/tools:$PATH | ||
RUN scriptcs -install PowerAssert 1.0.87 | ||
|
||
COPY src/ src/ | ||
WORKDIR /exercises-csharp | ||
ENV PATH=/exercises-csharp/bin:$PATH | ||
|
||
RUN dotnet script src/Warmup.csx | ||
COPY src src | ||
RUN ln -s /exercises-csharp/src /src | ||
|
||
COPY . . | ||
|
||
RUN make test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
dotnet script Test.csx 2>&1 | ||
#!/bin/bash | ||
|
||
scriptcs Test.csx 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Console.WriteLine("Hello, World!"); | ||
Console.WriteLine("Hello, World!"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
class Functions | ||
{ | ||
public static double Random() => new Random().Next(); | ||
public static double RandomDouble() => new Random().NextDouble(); | ||
// public static double Random() => new Random().Next(); | ||
// public static double RandomDouble() => new Random().NextDouble(); | ||
|
||
public static double Random() { | ||
return new Random().Next(); | ||
} | ||
|
||
public static double RandomDouble() { | ||
return new Random().NextDouble(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#r "/root/.nuget/packages/powerassert/1.0.87/lib/netstandard2.0/PowerAssert.dll" | ||
#r "/scriptcs_packages/PowerAssert.1.0.87/lib/netstandard2.0/PowerAssert.dll" | ||
#load "Functions.csx" |