I'm getting pretty much from every application the changelog with a variable. Also I run a C# code after updating an application:
string downloadFolder = app.Variables.ReplaceAllInString("{download_folder}");
string appName = app.Variables.ReplaceAllInString("{appname}");
string version = app.Variables.ReplaceAllInString("{version}");
string changelog = app.Variables.ReplaceAllInString("{changelog}");
if (changelog == "{changelog}")
{
changelog = "";
}
using (System.IO.StreamWriter w = System.IO.File.AppendText(downloadFolder + @"\changelogs.html"))
{
w.WriteLine("<hr size=10 noshade>");
w.WriteLine("<h1>{0} - {1}</h1>", appName, version);
w.WriteLine(changelog);
w.WriteLine("<br><br><br>");
}
return;
After updating my applications I'm getting a changelogs.html that look like:
There are now two ways to continue with this file:
1. Rename the file with the actual date and time as a command "after updating all applications";
move "{download_folder}\changelogs.html" "{download_folder}\changelog-{yyyy}-{MM}-{dd}T{HH}-{mm}.html"
2. sending the content from changelogs.html via e-mail to me therefore I made a powershell script:
$smtpServer = "email.server.com"
$file = "C:\YOUR\DOWNLOAD\FOLDER\changelogs.html"
$body = "$(cat $file)"
$from ="Ketarin <ketrain@server.com>"
$to = "me@server.com"
$subject = "Ketarin Updates"
send-MailMessage -SmtpServer $smtpServer -To $to -From $from -Subject $subject -Body $body -BodyAsHtml -Encoding ([System.Text.Encoding]::UTF8)
Forgot to mention, that mean you can run Ketarin as a task and you getting after an application update an email.