Skip to content

Commit 2df6693

Browse files
author
Cédric Belin
committed
Update the "publish" task
1 parent 18ebf07 commit 2df6693

File tree

10 files changed

+27
-16
lines changed

10 files changed

+27
-16
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
Prevent comment spam using [Akismet](https://akismet.com) service, in [C#](https://learn.microsoft.com/en-us/dotnet/csharp).
55

66
## Documentation
7-
- [User guide](https://github.com/cedx/akismet.cs/wiki)
8-
- [Examples](https://github.com/cedx/akismet.cs/tree/main/example)
7+
- [User guide](https://github.com/cedx/akismet.net/wiki)
8+
- [Examples](https://github.com/cedx/akismet.net/tree/main/example)
99

1010
## Development
11-
- [Git repository](https://github.com/cedx/akismet.cs)
12-
- [Submit an issue](https://github.com/cedx/akismet.cs/issues)
11+
- [Git repository](https://github.com/cedx/akismet.net)
12+
- [Submit an issue](https://github.com/cedx/akismet.net/issues)
1313

1414
## License
15-
[Akismet for .NET](https://github.com/cedx/akismet.cs) is distributed under the MIT License.
15+
[Akismet for .NET](https://github.com/cedx/akismet.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("Akismet.slnx", new() { OutputDirectory = "var" }))
28+
.Does(() => DotNetNuGetPush($"var/Belin.Akismet.{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/CheckComment.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
var comment = new Comment(author) {
1616
Content = "A user comment.",
1717
Date = DateTime.Now,
18-
Referrer = new Uri("https://github.com/cedx/akismet.cs"),
18+
Referrer = new Uri("https://github.com/cedx/akismet.net"),
1919
Type = CommentType.ContactForm
2020
};
2121

share/check_comment.http

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ POST {{apiUrl}}/1.1/comment-check
55
Content-Type: application/x-www-form-urlencoded
66

77
api_key={{$processEnv AKISMET_API_KEY}}
8-
&blog=https://github.com/cedx/akismet.cs
8+
&blog=https://github.com/cedx/akismet.net
99
&comment_author=Akismet
1010
&comment_author_url=https://belin.io
1111
&comment_content=I'm testing out the Service API.
@@ -21,7 +21,7 @@ POST {{apiUrl}}/1.1/comment-check
2121
Content-Type: application/x-www-form-urlencoded
2222

2323
api_key={{$processEnv AKISMET_API_KEY}}
24-
&blog=https://github.com/cedx/akismet.cs
24+
&blog=https://github.com/cedx/akismet.net
2525
&comment_author=viagra-test-123
2626
&comment_content=Spam!
2727
&comment_type=trackback

share/submit_ham.http

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ POST {{apiUrl}}/1.1/submit-ham
55
Content-Type: application/x-www-form-urlencoded
66

77
api_key={{$processEnv AKISMET_API_KEY}}
8-
&blog=https://github.com/cedx/akismet.cs
8+
&blog=https://github.com/cedx/akismet.net
99
&comment_author=Akismet
1010
&comment_author_url=https://belin.io
1111
&comment_content=I'm testing out the Service API.

share/submit_spam.http

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ POST {{apiUrl}}/1.1/submit-spam
55
Content-Type: application/x-www-form-urlencoded
66

77
api_key={{$processEnv AKISMET_API_KEY}}
8-
&blog=https://github.com/cedx/akismet.cs
8+
&blog=https://github.com/cedx/akismet.net
99
&comment_author=viagra-test-123
1010
&comment_content=Spam!
1111
&comment_type=trackback

share/verify_key.http

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ POST {{apiUrl}}/1.1/verify-key
55
Content-Type: application/x-www-form-urlencoded
66

77
api_key={{$processEnv AKISMET_API_KEY}}
8-
&blog=https://github.com/cedx/akismet.cs
8+
&blog=https://github.com/cedx/akismet.net

src/Akismet.csproj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77
<Version>1.0.0</Version>
88
</PropertyGroup>
99

10+
<PropertyGroup>
11+
<Authors>CedX</Authors>
12+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
13+
<PackageReadmeFile>README.md</PackageReadmeFile>
14+
<PackageTags>akismet;api;client;comment;spam;validation</PackageTags>
15+
<RepositoryUrl>https://github.com/cedx/akismet.net.git</RepositoryUrl>
16+
</PropertyGroup>
17+
1018
<PropertyGroup>
1119
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
1220
<AssemblyName>Belin.Akismet</AssemblyName>
@@ -18,5 +26,6 @@
1826

1927
<ItemGroup>
2028
<InternalsVisibleTo Include="Belin.Akismet.Tests" />
29+
<None Include="../README.md" Pack="true" PackagePath="/" />
2130
</ItemGroup>
2231
</Project>

test/BlogTest.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ public sealed class BlogTest {
1111
[TestMethod]
1212
public void ToDictionary() {
1313
// It should return only the blog URL with a newly created instance.
14-
var map = new Blog(url: "https://github.com/cedx/akismet.cs").ToDictionary();
14+
var map = new Blog(url: "https://github.com/cedx/akismet.net").ToDictionary();
1515
AreEqual(1, map.Count);
16-
AreEqual("https://github.com/cedx/akismet.cs", map["blog"]);
16+
AreEqual("https://github.com/cedx/akismet.net", map["blog"]);
1717

1818
// It should return a non-empty map with an initialized instance.
19-
map = new Blog(url: "https://github.com/cedx/akismet.cs") { Charset = Encoding.UTF8, Languages = ["en", "fr"] }.ToDictionary();
19+
map = new Blog(url: "https://github.com/cedx/akismet.net") { Charset = Encoding.UTF8, Languages = ["en", "fr"] }.ToDictionary();
2020
AreEqual(3, map.Count);
21-
AreEqual("https://github.com/cedx/akismet.cs", map["blog"]);
21+
AreEqual("https://github.com/cedx/akismet.net", map["blog"]);
2222
AreEqual("utf-8", map["blog_charset"]);
2323
AreEqual("en,fr", map["blog_lang"]);
2424
}

test/ClientTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public sealed class ClientTest {
2828
/// Creates a new test.
2929
/// </summary>
3030
public ClientTest() {
31-
client = new Client(Environment.GetEnvironmentVariable("AKISMET_API_KEY")!, new Blog("https://github.com/cedx/akismet.cs")) { IsTest = true };
31+
client = new Client(Environment.GetEnvironmentVariable("AKISMET_API_KEY")!, new Blog("https://github.com/cedx/akismet.net")) { IsTest = true };
3232

3333
var hamAuthor = new Author(ipAddress: "192.168.0.1") {
3434
Name = "Akismet",

0 commit comments

Comments
 (0)