Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要自动检查我的系统是否运行最新发布的 Qt 版本。在我的软件中,我QT_VERSION_STR用来获取 Qt 的编译版本。
QT_VERSION_STR
但是如何确定 python 脚本中的最新发布版本?对于 Wordpress,有一个花哨的API 调用。有人知道Qt的等价物吗?
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]}'