Skip to content

Commit 5fd0c20

Browse files
authored
Added ephemeral example (#53)
1 parent 8ce99ed commit 5fd0c20

File tree

8 files changed

+42
-10
lines changed

8 files changed

+42
-10
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ jobs:
2525
git fetch --prune --unshallow --tags
2626
echo exit code $?
2727
git tag --list
28-
- uses: actions/setup-dotnet@v1
28+
29+
# Install .NET version as mandated by global.json
30+
- uses: actions/setup-dotnet@v3
2931
with:
30-
dotnet-version: '5.0.408'
31-
source-url: https://nuget.pkg.github.com/elastic/index.json
32+
global-json-file: global.json
3233
env:
3334
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
3435

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
</PropertyGroup>
1010
<ItemGroup>
1111
<PackageReference Include="MinVer" Version="2.3.1" PrivateAssets="all" />
12-
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies.net461" Version="1.0.0" PrivateAssets="all"/>
12+
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies.net461" Version="1.0.3" PrivateAssets="all"/>
1313
</ItemGroup>
1414
</Project>

Elastic.Abstractions.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ ProjectSection(SolutionItems) = preProject
4343
.github\workflows\ci.yml = .github\workflows\ci.yml
4444
EndProjectSection
4545
EndProject
46+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elastic.Ephemeral.Example", "examples\Elastic.Ephemeral.Example\Elastic.Ephemeral.Example.csproj", "{9666AFDC-B0E8-489C-A25A-17E67303A969}"
47+
EndProject
4648
Global
4749
GlobalSection(SolutionConfigurationPlatforms) = preSolution
4850
Debug|Any CPU = Debug|Any CPU
@@ -62,6 +64,7 @@ Global
6264
{80DE8673-CB3E-4D0B-99F4-A5CECF6BE752} = {77E78EDE-60D5-469A-B431-443A7966A243}
6365
{C05F7B36-EEF7-4BCD-86A2-F5F1BB8CFEB9} = {77E78EDE-60D5-469A-B431-443A7966A243}
6466
{D6997ADC-E933-418E-831C-DE1A78897493} = {F75ACC18-D314-4F1F-88A3-2002EAC4E207}
67+
{9666AFDC-B0E8-489C-A25A-17E67303A969} = {9D154338-4AA8-40A9-A378-B27C05D45791}
6568
EndGlobalSection
6669
GlobalSection(ExtensibilityGlobals) = postSolution
6770
SolutionGuid = {AFADDCED-A7DD-43E7-B03C-27F57AC5C358}
@@ -107,5 +110,9 @@ Global
107110
{80DE8673-CB3E-4D0B-99F4-A5CECF6BE752}.Debug|Any CPU.Build.0 = Debug|Any CPU
108111
{80DE8673-CB3E-4D0B-99F4-A5CECF6BE752}.Release|Any CPU.ActiveCfg = Release|Any CPU
109112
{80DE8673-CB3E-4D0B-99F4-A5CECF6BE752}.Release|Any CPU.Build.0 = Release|Any CPU
113+
{9666AFDC-B0E8-489C-A25A-17E67303A969}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
114+
{9666AFDC-B0E8-489C-A25A-17E67303A969}.Debug|Any CPU.Build.0 = Debug|Any CPU
115+
{9666AFDC-B0E8-489C-A25A-17E67303A969}.Release|Any CPU.ActiveCfg = Release|Any CPU
116+
{9666AFDC-B0E8-489C-A25A-17E67303A969}.Release|Any CPU.Build.0 = Release|Any CPU
110117
EndGlobalSection
111118
EndGlobal

build/scripts/Targets.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ let private restoreTools = lazy(exec "dotnet" ["tool"; "restore"])
2121
let private currentVersion =
2222
lazy(
2323
restoreTools.Value |> ignore
24-
let r = Proc.Start("dotnet", "minver", "-d", "canary", "-m", "0.1")
24+
let r = Proc.Start("dotnet", "minver", "-d=canary", "-m=0.1", "-v=e")
2525
let o = r.ConsoleOut |> Seq.find (fun l -> not(l.Line.StartsWith("MinVer:")))
2626
o.Line
2727
)

build/scripts/scripts.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net5.0</TargetFramework>
5+
<TargetFramework>net6.0</TargetFramework>
66
<IsPackable>false</IsPackable>
77
</PropertyGroup>
88
<ItemGroup>

dotnet-tools.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@
33
"isRoot": true,
44
"tools": {
55
"minver-cli": {
6-
"version": "2.3.1",
6+
"version": "4.3.0",
77
"commands": [
88
"minver"
99
]
1010
},
1111
"assembly-differ": {
12-
"version": "0.13.0",
12+
"version": "0.14.0",
1313
"commands": [
1414
"assembly-differ"
1515
]
1616
},
1717
"release-notes": {
18-
"version": "0.3.0",
18+
"version": "0.5.2",
1919
"commands": [
2020
"release-notes"
2121
]
2222
},
2323
"nupkg-validator": {
24-
"version": "0.4.0",
24+
"version": "0.5.0",
2525
"commands": [
2626
"nupkg-validator"
2727
]
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net6.0</TargetFramework>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
<Nullable>enable</Nullable>
8+
<IsPackable>False</IsPackable>
9+
</PropertyGroup>
10+
11+
<ItemGroup>
12+
<ProjectReference Include="..\..\src\Elastic.Elasticsearch.Ephemeral\Elastic.Elasticsearch.Ephemeral.csproj"/>
13+
</ItemGroup>
14+
15+
</Project>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Licensed to Elasticsearch B.V under one or more agreements.
2+
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3+
// See the LICENSE file in the project root for more information
4+
5+
using Elastic.Elasticsearch.Ephemeral;
6+
7+
var config = new EphemeralClusterConfiguration("8.7.0");
8+
var cluster = new EphemeralCluster(config);
9+
using var started = cluster.Start();

0 commit comments

Comments
 (0)