feat(qsl): credit line at the foot of the default QSL e-mail
"Designed & sent by OpsLog — https://github.com/GregTroar/OpsLog/releases/latest" now closes the default body, so a fresh install sends it without being asked. Put in the TEMPLATE, not appended at send time. Two consequences, both of them the point: an operator who does not want it deletes the line once and it is gone, and one who has already written their own body never sees it appear — a stored template is returned verbatim and the default is only the fallback. Appending it at send would have made it unremovable, which is not a thing to do to somebody's outgoing mail. The link is the human release page. updateCheckURL sits next to it in update.go and answers JSON, which is the easy mistake here — a correspondent who clicks the credit gets a download page, and a test says so.
This commit is contained in:
@@ -23,6 +23,11 @@ import (
|
||||
// build (the exe lives there; source stays on Gitea). Adjust the repo if needed.
|
||||
const updateCheckURL = "https://api.github.com/repos/GregTroar/OpsLog/releases/latest"
|
||||
|
||||
// releasesPageURL is the same release, for people rather than for the updater:
|
||||
// the API address above answers JSON, so it is not something to put in front of
|
||||
// an operator who followed a link out of a QSL e-mail.
|
||||
const releasesPageURL = "https://github.com/GregTroar/OpsLog/releases/latest"
|
||||
|
||||
// UpdateInfo is the result of the version check.
|
||||
type UpdateInfo struct {
|
||||
Current string `json:"current"` // this build's version (appVersion)
|
||||
@@ -367,8 +372,8 @@ func cleanupOldUpdateBinary() {
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_ = os.Remove(exe + ".old") // the old fixed name
|
||||
_ = os.Remove(exe + ".new") // a deferred swap that has been applied
|
||||
_ = os.Remove(exe + ".old") // the old fixed name
|
||||
_ = os.Remove(exe + ".new") // a deferred swap that has been applied
|
||||
matches, err := filepath.Glob(exe + ".old-*")
|
||||
if err != nil {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user