ALL_OFF="$(tput sgr0)"
YELLOW="${BOLD}$(tput setaf 3)"
WHITE="${BOLD}$(tput setaf 7)"

_eol_electron_warning() {
  local _postman_electron=$(strings opt/postman/app/postman | grep -Pom1 'Electron/[0-9\.]+')
  local _warning="Postman uses $_postman_electron.  To check whether this version of Electron still receives security updates, see https://endoflife.date/electron"
  printf "${YELLOW}WARNING: ${WHITE}%s${ALL_OFF}\n" "$_warning"
}

post_install() {
  _eol_electron_warning
}

post_upgrade() {
  _eol_electron_warning
}
