@@ -675,6 +675,9 @@ resolve_latest() {
675675 logV " Determing latest dmd-beta version (${mirrors[0]} )."
676676 COMPILER=" dmd-$( fetch " ${mirrors[@]} " ) "
677677 ;;
678+ dmd-nightly)
679+ COMPILER=" dmd-nightly"
680+ ;;
678681 dmd-* ) # nightly master or feature branch
679682 # dmd-nightly, dmd-master, dmd-branch
680683 # but not: dmd-2016-10-19 or dmd-branch-2016-10-20
@@ -798,6 +801,19 @@ install_compiler() {
798801
799802 download_and_unpack_with_verify " $ROOT /$compiler " " $url "
800803
804+ # Nightlies uploaded to the DMD repo
805+ elif [[ $1 == dmd-nightly ]]; then
806+ local baseUrl=" https://github.com/dlang/dmd/releases/download/nightly/dmd.master"
807+ local ext
808+ test $OS = windows && ext=7z || ext=tar.xz
809+ local mod=
810+ test $OS = freebsd && mod=-64
811+
812+ download_and_unpack_without_verify " $ROOT /$compiler " " $baseUrl .$OS$mod .$ext "
813+
814+ # Create symlink `dmd-master => dmd-nightly` to be compatible with the old behaviour
815+ ln -s " $ROOT /$compiler " " $ROOT /dmd-master"
816+
801817 # ldc-0.12.1 or ldc-0.15.0-alpha1
802818 elif [[ $1 =~ ^ldc-(( [0 - 9 ]+ )\.([0 - 9 ]+ )\.[0 - 9 ]+ (- .* )? )$ ]]; then
803819 local ver=${BASH_REMATCH[1]}
@@ -1193,6 +1209,11 @@ uninstall_compiler() {
11931209 fi
11941210 log " Removing $( display_path " $ROOT /$1 " ) "
11951211 rm -rf " ${ROOT:? } /$1 "
1212+
1213+ # Remove the compatibility symlink for the nightlies
1214+ if [ " $1 " == " dmd-nightly" ]; then
1215+ rm -rf " ${ROOT:? } /dmd-master"
1216+ fi
11961217}
11971218
11981219list_compilers () {
0 commit comments