4
4
using JetBrains . TeamCity . ServiceMessages . Write . Special ;
5
5
using NuGet . Versioning ;
6
6
7
- const string solutionFile = "TeamCity. CSharpInteractive.sln" ;
8
- const string packageId = "TeamCity. CSharpInteractive" ;
9
- const string toolPackageId = "TeamCity. csi" ;
10
- const string templatesPackageId = "TeamCity. CSharpInteractive.Templates" ;
7
+ const string solutionFile = "CSharpInteractive.sln" ;
8
+ const string packageId = "CSharpInteractive" ;
9
+ const string toolPackageId = "dotnet- csi" ;
10
+ const string templatesPackageId = "CSharpInteractive.Templates" ;
11
11
var frameworks = new [ ] { "net6.0" , "net7.0" } ;
12
12
13
13
var currentDir = Environment . CurrentDirectory ;
21
21
var apiKey = Property . Get ( "apiKey" , "" ) ;
22
22
var integrationTests = bool . Parse ( Property . Get ( "integrationTests" , Tools . UnderTeamCity . ToString ( ) ) ) ;
23
23
var defaultVersion = NuGetVersion . Parse ( Property . Get ( "version" , "1.0.0-dev" , Tools . UnderTeamCity ) ) ;
24
- var outputDir = Path . Combine ( currentDir , "TeamCity. CSharpInteractive" , "bin" , configuration ) ;
25
- var templateOutputDir = Path . Combine ( currentDir , "TeamCity. CSharpInteractive.Templates" , "bin" , configuration ) ;
24
+ var outputDir = Path . Combine ( currentDir , "CSharpInteractive" , "bin" , configuration ) ;
25
+ var templateOutputDir = Path . Combine ( currentDir , "CSharpInteractive.Templates" , "bin" , configuration ) ;
26
26
27
27
var dockerLinuxTests = false ;
28
28
new DockerCustom ( "info" ) . WithShortName ( "Defining a docker container type" )
52
52
{
53
53
new PackageInfo (
54
54
packageId ,
55
- Path . Combine ( "TeamCity. CSharpInteractive" , "TeamCity. CSharpInteractive.csproj" ) ,
56
- Path . Combine ( outputDir , "TeamCity. CSharpInteractive" , $ "{ packageId } .{ packageVersion . ToString ( ) } .nupkg") ,
55
+ Path . Combine ( "CSharpInteractive" , "CSharpInteractive.csproj" ) ,
56
+ Path . Combine ( outputDir , "CSharpInteractive" , $ "{ packageId } .{ packageVersion . ToString ( ) } .nupkg") ,
57
57
packageVersion ,
58
58
true ) ,
59
59
60
60
new PackageInfo (
61
61
toolPackageId ,
62
- Path . Combine ( "TeamCity. CSharpInteractive" , "TeamCity. CSharpInteractive.Tool.csproj" ) ,
63
- Path . Combine ( outputDir , "TeamCity. CSharpInteractive.Tool" , $ "{ toolPackageId } .{ packageVersion . ToString ( ) } .nupkg") ,
62
+ Path . Combine ( "CSharpInteractive" , "CSharpInteractive.Tool.csproj" ) ,
63
+ Path . Combine ( outputDir , "CSharpInteractive.Tool" , $ "{ toolPackageId } .{ packageVersion . ToString ( ) } .nupkg") ,
64
64
packageVersion ,
65
65
true ) ,
66
66
67
67
new PackageInfo (
68
68
templatesPackageId ,
69
- Path . Combine ( "TeamCity. CSharpInteractive.Templates" , "TeamCity. CSharpInteractive.Templates.csproj" ) ,
69
+ Path . Combine ( "CSharpInteractive.Templates" , "CSharpInteractive.Templates.csproj" ) ,
70
70
Path . Combine ( templateOutputDir , $ "{ templatesPackageId } .{ templatePackageVersion . ToString ( ) } .nupkg") ,
71
71
templatePackageVersion ,
72
72
false )
131
131
. AddArgs ( cmd . Args )
132
132
. AddArgs (
133
133
$ "--dcOutput={ dotCoverSnapshot } ",
134
- "--dcFilters=+:module=TeamCity. CSharpInteractive.HostApi;+:module=dotnet-csi" ,
134
+ "--dcFilters=+:module=CSharpInteractive.HostApi;+:module=dotnet-csi" ,
135
135
"--dcAttributeFilters=System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage" ) )
136
136
. Build ( ) ) ;
137
137
189
189
Warning ( $ "{ uninstallTool } failed.") ;
190
190
}
191
191
192
- var installTool = new DotNetCustom ( "tool" , "install" , toolPackageId , "-g" , "--version" , packageVersion . ToString ( ) , "--add-source" , Path . Combine ( outputDir , "TeamCity. CSharpInteractive.Tool" ) )
192
+ var installTool = new DotNetCustom ( "tool" , "install" , toolPackageId , "-g" , "--version" , packageVersion . ToString ( ) , "--add-source" , Path . Combine ( outputDir , "CSharpInteractive.Tool" ) )
193
193
. WithShortName ( "Installing tool" ) ;
194
194
195
195
if ( installTool . Run ( output => WriteLine ( output . Line ) ) != 0 )
221
221
{
222
222
var sampleProjectDir = Path . Combine ( "Samples" , "DemoProject" , "MySampleLib" , "MySampleLib.Tests" ) ;
223
223
Assertion . Succeed ( new DotNetCustom ( "new" , "build" , $ "--package-version={ packageVersion } ", "-T" , framework , "--no-restore" ) . WithWorkingDirectory ( buildProjectDir ) . Run ( ) , $ "Creating a new { sampleProjectName } ") ;
224
- Assertion . Succeed ( new DotNetBuild ( ) . WithProject ( buildProjectDir ) . AddSources ( Path . Combine ( outputDir , "TeamCity. CSharpInteractive" ) ) . WithShortName ( $ "Building the { sampleProjectName } ") . Build ( ) ) ;
224
+ Assertion . Succeed ( new DotNetBuild ( ) . WithProject ( buildProjectDir ) . AddSources ( Path . Combine ( outputDir , "CSharpInteractive" ) ) . WithShortName ( $ "Building the { sampleProjectName } ") . Build ( ) ) ;
225
225
Assertion . Succeed ( new DotNetRun ( ) . WithProject ( buildProjectDir ) . WithNoBuild ( true ) . WithWorkingDirectory ( sampleProjectDir ) . Run ( ) , $ "Running a build for the { sampleProjectName } ") ;
226
226
Assertion . Succeed ( new DotNetCustom ( "csi" , Path . Combine ( buildProjectDir , "Program.csx" ) ) . WithWorkingDirectory ( sampleProjectDir ) . Run ( ) , $ "Running a build as a C# script for the { sampleProjectName } ") ;
227
227
}
272
272
WriteLine ( $ "The coverage percentage: { coveragePercentage } ", Color . Highlighted ) ;
273
273
return 0 ;
274
274
275
- record PackageInfo ( string Id , string Project , string Package , NuGetVersion Version , bool Publish ) ;
275
+ internal record PackageInfo ( string Id , string Project , string Package , NuGetVersion Version , bool Publish ) ;
0 commit comments