get Rstudio latest version number programatically

Is there a way to get the lastest Rstudio version number in a shell script? I have tried this and it works for now;
latest=$(curl -s https://rstudio.com/products/rstudio/release-notes/ | grep h2 | awk '{print $3;}' | awk -F "<" '{print $1}')

are there any more robust ways?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.