Closed eanon closed 3 years ago
OK, using the "--help" option on cmdline, it displays the version at top of the help... But how when smtp4dev is running as a service?
To develop a little: I have several dev and staging platforms, and I would like to know the ones to update or not... Some are running smtp4dev as a service under Windows and some others as a daemon under Linux (ie. systemd); or in docker. Is there a way to check the smtp4dev version programmatically or see it through the web client (so I could scrape it)?
--
EDIT: for now, I just catch the output of "Rnwood.smpt4dev --help" (or going through "docker exec -t -i
If there was an http api endpoint to hit would that suit? ie HTTP get to 3.1.0
for example
You could then scrape all the instances with curl or similar quite easily?
Yes, it would be perfect!
Awaiting, I extract the version string from command line using something like this (in my test-suite in Python):
cmd = "docker exec d9b68a69a7e7 /app/Rnwood.Smtp4dev --help | grep 'smtp4dev version'"
proc = subprocess.run(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)
output_parts = proc.stdout.split()
curr_ver_str = output_parts[len(output_parts) - 1]
How to display (or check programmatically) the smtp4dev version? Unless mistake, I don't see this indication in the client UI nor through a command line option like the usual "--version". TIA