Is there a way to generate an email to myself when Espocrm releases a new version so I'll know to update? I don't log in very often to check "Administration" where a notice is posted so an email would be better. Can it be done?
Announcement
Collapse
No announcement yet.
Create email when new version is available?
Collapse
X
-
Thanks for the Github idea. I'll have to check it out.
Here is sort of the workflow I was thinking about, although I don't know if this CAN be done or if I have the scripting skills to do it.
- Go to the EspoCRM download page and get the current version: Latest Release EspoCRM 6.1.7 (May 05, 2021) and put 6.1.7 in a .txt file on your server where EspoCRM resides.
From then on set up a cron job to do the following:
- Do a curl and get the EspoCRM download screen and extract this line: Latest Release EspoCRM 6.1.7 (May 05, 2021)
- . Parse the line to just get the version number (6.1.7)
3 Read the saved .txt file and compare it to what was just obtained from the parse.
4. If different:
Create an email (using curl or ssmtp)... saying a new version is available.
Put the new version into the text file, erasing the old one and save it.
Instead of using curl to get the page you might be able to obtain it via the "php command version" but I'm not sure how to do that in a bash script... might be easier to do it in a PHP script?
Anyway, if I can find some code the does parsing, I might give this a try. I don't want to sit down and figure out how to parse when I know there are tools that do this... maybe sed or awk?
Anyone have any ideas?
Comment
-
I had some time so I thought I'd write a bash script to send me an email when a new version was available. The code is below. Of course, it will NOT work if EspoCRM changes the download page with the string that we search on.
I run this via a crontab entry each night and if there was a change there will be an email waiting for me in the morning.
Yes, this could have been done in less code by a better bash coder, but it works and the second or so I might save is not worth the effort.
Code:#!/bin/bash # change directory cd /xxxx/xxxx/chk-espo-version # get the Espo download page, take out all the html and find the line we want. Put it in a .txt file curl -s https://www.espocrm.com/download/ | html2text | grep 'Latest Release EspoCRM' > from_espocrm.txt # set up two variables we will use in the 'if' statement var_from_espocrm=$( cat from_espocrm.txt ) var_prev_version=$( cat prev_version.txt ) # print out for testing #echo "var_from_espocrm " "$var_from_espocrm" #echo "var_prev_version " "$var_prev_version" # check to see what was in the previous version file with this one if [ "$var_from_espocrm" != "$var_prev_version" ] then # empty out the email.txt file > email.txt # set up our email.txt file for sending echo "From: your title <xxx@yyy.com>" >> email.txt echo "To: your-name <xxx@yyy.com>" >> email.txt echo "Subject: New EspoCRM version" >> email.txt echo "---------- " >> email.txt date >> email.txt echo "---------- " >> email.txt echo "Message: " "$var_from_espocrm " >> email.txt # save the new version into a txt file (that we checked above.) echo "$var_from_espocrm" > prev_version.txt # send the email via curl curl -s smtp://xxxx.mail.xxxx.com --mail-from xxx@xxxx.com --mail-rcpt xxx@yyyy.com --upload-file email.txt fi # touch a file showing the time we are done. touch chk-espo-verion-time.txt
Alan N. Canton, Managing Partner
NewMedia Create
Fair Oaks, CA
- Likes 1
Comment
-
My bad, I should have link it with the #anchor.
It under this section: https://docs.github.com/en/github/ma...ual-repository
Seem quite straight forward from the look of it:
(1) click watch
(2) custom
(3) choose release
Comment
Comment