Skip to content

Commit 7501e95

Browse files
author
Cédric Belin
committed
Update the "publish" task
1 parent 5e3bfde commit 7501e95

File tree

7 files changed

+17
-15
lines changed

7 files changed

+17
-15
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ Parse and format [LCOV](https://github.com/linux-test-project/lcov) coverage rep
55
in [C#](https://learn.microsoft.com/en-us/dotnet/csharp).
66

77
## Documentation
8-
- [User guide](https://github.com/cedx/lcov.cs/wiki)
9-
- [Examples](https://github.com/cedx/lcov.cs/tree/main/example)
8+
- [User guide](https://github.com/cedx/lcov.net/wiki)
9+
- [Examples](https://github.com/cedx/lcov.net/tree/main/example)
1010

1111
## Development
12-
- [Git repository](https://github.com/cedx/lcov.cs)
13-
- [Submit an issue](https://github.com/cedx/lcov.cs/issues)
12+
- [Git repository](https://github.com/cedx/lcov.net)
13+
- [Submit an issue](https://github.com/cedx/lcov.net/issues)
1414

1515
## License
16-
[LCOV Reports for .NET](https://github.com/cedx/lcov.cs) is distributed under the MIT License.
16+
[LCOV Reports for .NET](https://github.com/cedx/lcov.net) is distributed under the MIT License.

build.cake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ Task("publish")
2424
.Description("Publishes the package.")
2525
.WithCriteria(release, @"the ""Release"" configuration must be enabled")
2626
.IsDependentOn("default")
27+
.Does(() => DotNetPack("Lcov.slnx", new() { OutputDirectory = "var" }))
28+
.Does(() => DotNetNuGetPush($"var/Belin.Lcov.{version}.nupkg", new() { ApiKey = EnvironmentVariable("NUGET_API_KEY"), Source = "https://api.nuget.org/v3/index.json" }))
2729
.DoesForEach(["tag", "push origin"], action => StartProcess("git", $"{action} v{version}"));
2830

2931
Task("test")

example/FormatReport.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
new LineData { LineNumber = 7, ExecutionCount = 2, Checksum = "yGMB6FhEEAd8OyASe3Ni1w" }
88
};
99

10-
var sourceFile = new SourceFile("/home/cedx/lcov.cs/fixture.cs") {
10+
var sourceFile = new SourceFile("/home/cedx/lcov.net/fixture.cs") {
1111
Functions = new FunctionCoverage { Found = 1, Hit = 1 },
1212
Lines = new LineCoverage { Found = 2, Hit = 2, Data = lineData }
1313
};

res/Lcov.info

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
TN:Example
22

3-
SF:/home/cedx/lcov.cs/fixture.cs
3+
SF:/home/cedx/lcov.net/fixture.cs
44
FN:4,main
55
FNDA:2,main
66
FNF:1
@@ -13,7 +13,7 @@ LF:4
1313
LH:4
1414
end_of_record
1515

16-
SF:/home/cedx/lcov.cs/func1.cs
16+
SF:/home/cedx/lcov.net/func1.cs
1717
FN:5,func1
1818
FNDA:4,func1
1919
FNF:1
@@ -37,7 +37,7 @@ LF:9
3737
LH:9
3838
end_of_record
3939

40-
SF:/home/cedx/lcov.cs/func2.cs
40+
SF:/home/cedx/lcov.net/func2.cs
4141
FN:5,func2
4242
FNDA:2,func2
4343
FNF:1

src/Lcov.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<PackageLicenseExpression>MIT</PackageLicenseExpression>
1313
<PackageReadmeFile>README.md</PackageReadmeFile>
1414
<PackageTags>coverage;formatter;lcov;parser;test;writer</PackageTags>
15-
<RepositoryUrl>https://github.com/cedx/lcov.cs.git</RepositoryUrl>
15+
<RepositoryUrl>https://github.com/cedx/lcov.net.git</RepositoryUrl>
1616
</PropertyGroup>
1717

1818
<PropertyGroup>

test/ReportTest.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ public ReportTest() =>
2121
public void Parse() {
2222
var report = Report.Parse(coverage);
2323
AreEqual(3, report.SourceFiles.Count);
24-
AreEqual("/home/cedx/lcov.cs/fixture.cs", report.SourceFiles[0].Path);
25-
AreEqual("/home/cedx/lcov.cs/func1.cs", report.SourceFiles[1].Path);
26-
AreEqual("/home/cedx/lcov.cs/func2.cs", report.SourceFiles[2].Path);
24+
AreEqual("/home/cedx/lcov.net/fixture.cs", report.SourceFiles[0].Path);
25+
AreEqual("/home/cedx/lcov.net/func1.cs", report.SourceFiles[1].Path);
26+
AreEqual("/home/cedx/lcov.net/func2.cs", report.SourceFiles[2].Path);
2727

2828
var branches = report.SourceFiles[1].Branches!;
2929
AreEqual(4, branches.Found);

test/SourceFileTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public void TestToString() {
1111
var sourceFile = new SourceFile(path: string.Empty);
1212
AreEqual("SF:\nend_of_record", sourceFile.ToString());
1313

14-
sourceFile = new SourceFile("/home/cedx/lcov.cs") { Branches = new(), Functions = new(), Lines = new() };
15-
AreEqual($"SF:/home/cedx/lcov.cs\n{sourceFile.Functions}\n{sourceFile.Branches}\n{sourceFile.Lines}\nend_of_record", sourceFile.ToString());
14+
sourceFile = new SourceFile("/home/cedx/lcov.net/program.cs") { Branches = new(), Functions = new(), Lines = new() };
15+
AreEqual($"SF:/home/cedx/lcov.net/program.cs\n{sourceFile.Functions}\n{sourceFile.Branches}\n{sourceFile.Lines}\nend_of_record", sourceFile.ToString());
1616
}
1717
}

0 commit comments

Comments
 (0)