What's the best way to programmatically detect the most recent release of DMD and others?
Jacob Carlborg
doob at me.com
Mon Oct 16 18:21:46 UTC 2017
On 2017-10-16 17:13, Andrew Edwards wrote:
> The best way I know to determine the latest DMD release is
> http://ftp.digitalmars.com/LATEST. I'm not aware that such a file exists
> for LDC and GDC so I'm currently doing:
>
> string latest(string url) {
> return executeShell("git ls-remote --tags " ~ url ~ " | cut -d 'v'
> -f 2 | cut -d '-' -f 1 | cut -d '^' -f 1 | uniq | tail -n 1").output.strip;
> }
>
> Is there a better way?
The official download script [1] is using the following:
dmd - http://downloads.dlang.org/releases/LATEST
dmd beta - http://downloads.dlang.org/pre-releases/LATEST
ldc - https://ldc-developers.github.io/LATEST
ldc beta - https://ldc-developers.github.io/LATEST_BETA
gdc - http://gdcproject.org/downloads/LATEST
[1] https://dlang.org/install.sh
--
/Jacob Carlborg
More information about the Digitalmars-d-learn
mailing list