Simon Warta
Simon Warta

Reputation: 11408

What's the easiest way to programmatically find the latest Qt version number?

I need to automatically check, if my systems are running the latest released Qt version. In my software I use QT_VERSION_STR to get the compile version of Qt.

But how can I determine the latest released version in a python script? For Wordpress, there is a fancy API call. Does someone know an equivalent for Qt?

Upvotes: 4

Views: 573

Answers (1)

svlasov
svlasov

Reputation: 10455

Query the latest tag from git repository:

$ git ls-remote --tags https://gitorious.org/qt/qt5.git \
| awk '{print $2}' \
| grep -v '\^{}$' \
| grep -v '-' \
| sort | tail -1 \
| awk '{split($0,a,"/"); print a[3]}'   

Upvotes: 3

Related Questions