Skip to content

Commit

Permalink
Finalize.
Browse files Browse the repository at this point in the history
  • Loading branch information
Apollo3zehn committed Sep 8, 2022
1 parent 0d08460 commit 2ef9a4e
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 7 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## v5.0.0 - 2022-09-08

### Breaking Changes
- The previously introduced TCP client constructor overload was called `Connect` although it expected a totally externally managed TCP client which should already be connected. This constructor is now named `Initialize` and its signature has been adapted to better fit its purpose. The passed TCP client (or `IModbusRtuSerialPort` in case of the RTU client) is now not modified at all, i.e. configured timeouts or other things are not applied to these externally managed instances (#78).

### Features
- Modbus TCP and RTU clients implement `IDisposable` so you can do the following now: `using var client = new ModbusTcpClient(...)` (#67)
- Modbus server base class has now a virtual `Stop` method so the actual server can be stopped using a base class reference (#79).

### Bugs Fixed
- The Modbus server ignored the unit identifier and responded to all requests (#79).
- Modbus server side read timeout exception handling is more defined now:
- The TCP server closes the connection.
- The Modbus RTU server ignores the exception as there is only a single connection and if that one is closed, there would be no point in keeping the RTU server running.
- Modbus server did not properly handle asynchronous cancellation (#79).

> [See API changes on Fuget.org](https://www.fuget.org/packages/FluentModbus/5.0.0/lib/netstandard2.1/diff/4.1.0/)
Thanks @schotime and @LukasKarel for your PRs!
3 changes: 3 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<RestoreAdditionalProjectSources>
https://www.myget.org/F/apollo3zehn-dev/api/v3/index.json
</RestoreAdditionalProjectSources>
</PropertyGroup>

<PropertyGroup>
Expand Down
27 changes: 20 additions & 7 deletions build/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,31 @@
if final_version in (release["name"] for release in releases):
raise Exception(f"Release {final_version} already exists.")

print(" unique release: OK")
print(" unique release: OK")

# prompt for annotation
print("Please enter the release message (type 'quit' to stop):")
lines = itertools.takewhile(lambda x: x.strip() != "quit" and x.strip() != "quit()", sys.stdin)
release_message = "".join(lines).rstrip('\n')
# get annotation
with open("CHANGELOG.md") as file:
changelog = file.read()

matches = list(re.finditer(r"^##\s(.*?)\s-\s[0-9]{4}-[0-9]{2}-[0-9]{2}(.*?)(?=(?:\Z|^##\s))", changelog, re.MULTILINE | re.DOTALL))

if not matches:
raise Exception(f"The file CHANGELOG.md is malformed.")

match_for_version = next((match for match in matches if match[1] == final_version), None)

if not match_for_version:
raise Exception(f"No change log entry found for version {final_version}.")

release_message = match_for_version[2].strip()

print("extract annotation: OK")

# create tag
subprocess.check_output(["git", "tag", "-a", final_version, "-m", release_message, "--cleanup=whitespace"], stdin=None, stderr=None, shell=False)

print(" create tag: OK")
print(" create tag: OK")

# push tag
subprocess.check_output(["git", "push", "--quiet", "origin", final_version], stdin=None, stderr=None, shell=False)
print(" push tag: OK")
print(" push tag: OK")
File renamed without changes.
File renamed without changes.

0 comments on commit 2ef9a4e

Please sign in to comment.