Created
February 12, 2021 00:18
-
-
Save tox2ik/8bafc9132fec4200312bc65005aec99c to your computer and use it in GitHub Desktop.
enumerate php extension-api date-versions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://github.com/php/php-src.git | |
cd php-src | |
git tag \ | |
| grep -Eo 'php-([0-9]+\.?){3}$' \ | |
| sort -ut. -k1.5,1n -k2,2n -k3,3n \ | |
| while read tag; do | |
echo $tag ` | |
git show $tag:main/php.h | sed -n ' /#define PHP_API_VERSION /{ s///; p; q } ' | |
` ` | |
git show $tag:main/php_version.h | sed -n " /#define PHP_VERSION /{ s///; s/[\"']//g; p; q } " | |
` | |
done \ | |
| awk '{ ap[$2]=$0 } END { for (i in ap) { print ap[i] } }' \ | |
| column -t |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
curl https://gist.githubusercontent.com/tox2ik/8bafc9132fec4200312bc65005aec99c/raw/b7d921f157320b0cf451ae53577923bdf92801fc/ver.sh | bash