@@ -675,6 +675,9 @@ resolve_latest() {
675
675
logV " Determing latest dmd-beta version (${mirrors[0]} )."
676
676
COMPILER=" dmd-$( fetch " ${mirrors[@]} " ) "
677
677
;;
678
+ dmd-nightly)
679
+ COMPILER=" dmd-nightly"
680
+ ;;
678
681
dmd-* ) # nightly master or feature branch
679
682
# dmd-nightly, dmd-master, dmd-branch
680
683
# but not: dmd-2016-10-19 or dmd-branch-2016-10-20
@@ -798,6 +801,19 @@ install_compiler() {
798
801
799
802
download_and_unpack_with_verify " $ROOT /$compiler " " $url "
800
803
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
+
801
817
# ldc-0.12.1 or ldc-0.15.0-alpha1
802
818
elif [[ $1 =~ ^ldc-(( [0 - 9 ]+ )\.([0 - 9 ]+ )\.[0 - 9 ]+ (- .* )? )$ ]]; then
803
819
local ver=${BASH_REMATCH[1]}
@@ -1193,6 +1209,11 @@ uninstall_compiler() {
1193
1209
fi
1194
1210
log " Removing $( display_path " $ROOT /$1 " ) "
1195
1211
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
1196
1217
}
1197
1218
1198
1219
list_compilers () {
0 commit comments