This is an automated email from the ASF dual-hosted git repository.
blankensteiner pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-dotpulsar.git
The following commit(s) were added to refs/heads/master by this push:
new b7ede8f Validating DotPulsar release on MacOS (#203)
b7ede8f is described below
commit b7ede8f4c95d8eba9041297d6d41b7bc99168d8a
Author: entvex <[email protected]>
AuthorDate: Fri Feb 2 14:31:29 2024 +0100
Validating DotPulsar release on MacOS (#203)
Co-authored-by: David Jensen <[email protected]>
---
docs/release_validation_macos.md | 85 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 85 insertions(+)
diff --git a/docs/release_validation_macos.md b/docs/release_validation_macos.md
new file mode 100644
index 0000000..e5047dc
--- /dev/null
+++ b/docs/release_validation_macos.md
@@ -0,0 +1,85 @@
+# Validating DotPulsar release on MacOS
+
+## Prerequisites
+
+### Install dotnet-sdk
+
+```
+brew install --cask dotnet-sdk
+```
+
+### Show dotnet-sdk version
+
+```
+dotnet --info
+```
+
+## Validating source release
+
+Set exvironment variables
+```shell
+export DOTPULSAR_VERSION_RC=3.1.2-rc.1
+export DOTPULSAR_VERSION=${DOTPULSAR_VERSION_RC%-rc.*}
+```
+
+Download files
+```shell
+wget
https://dist.apache.org/repos/dist/dev/pulsar/pulsar-dotpulsar-${DOTPULSAR_VERSION_RC}/pulsar-dotpulsar-${DOTPULSAR_VERSION}-src.tar.gz{,.asc,.sha512}
+```
+
+Import GPG public keys
+```shell
+gpg --import <(curl -s https://downloads.apache.org/pulsar/KEYS)
+```
+
+Validate files
+```shell
+sha512sum -c *.sha512
+gpg --verify-files *.asc
+```
+
+## Building source package
+
+```shell
+tar zxvf pulsar-dotpulsar-${DOTPULSAR_VERSION}-src.tar.gz
+cd pulsar-dotpulsar-${DOTPULSAR_VERSION_RC}
+dotnet build
+```
+
+## Validating Nuget package
+
+Create a simple Pulsar app
+```shell
+dotnet new console -n PulsarApp
+cd PulsarApp
+dotnet add package DotPulsar --version "$DOTPULSAR_VERSION_RC"
+cat >Program.cs <<EOF
+using DotPulsar;
+using DotPulsar.Extensions;
+
+const string myTopic = "persistent://public/default/mytopic";
+
+// connecting to pulsar://localhost:6650
+await using var client = PulsarClient.Builder().Build();
+
+// consume messages
+await using var consumer = client.NewConsumer(Schema.String)
+ .SubscriptionName("MySubscription")
+ .Topic(myTopic)
+ .InitialPosition(SubscriptionInitialPosition.Earliest)
+ .Create();
+
+// produce a message
+await using var producer =
client.NewProducer(Schema.String).Topic(myTopic).Create();
+await producer.Send("Hello World");
+
+var message = consumer.Receive().Result;
+Console.WriteLine("Received: " + message.Value());
+await consumer.Acknowledge(message);
+Console.WriteLine("Acknowledged message");
+EOF
+dotnet build
+docker run --name pulsar-standalone -d --rm -it -p 8080:8080 -p 6650:6650
apachepulsar/pulsar:3.0.2 /pulsar/bin/pulsar standalone -nss -nfw
+dotnet run
+docker stop pulsar-standalone
+```
\ No newline at end of file