latest.png hack
Some checks failed
Create Release & Upload Assets / Upload Assets To Gitea w/ goreleaser (push) Failing after 2m17s
Some checks failed
Create Release & Upload Assets / Upload Assets To Gitea w/ goreleaser (push) Failing after 2m17s
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"image/png"
|
||||
"net/http"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
@@ -53,6 +54,13 @@ func CaptureImage() bool {
|
||||
log.Fatal().Err(err).Msgf("")
|
||||
} else {
|
||||
log.Info().Msg("New image created: " + config.StoragePath + filename)
|
||||
|
||||
cmd := exec.Command("cp", config.StoragePath+filename, config.StoragePath+"/latest.png")
|
||||
|
||||
err := cmd.Run()
|
||||
if err != nil {
|
||||
log.Error().Msgf("Error copying to latest.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user