Newer
Older
dub_jkp / release-windows.sh
@Sebastian Wilzbach Sebastian Wilzbach on 4 Jan 2019 481 bytes Build win{32,64} binaries with LDC
  1. #!/usr/bin/env bash
  2. # Build the Windows binaries under Linux
  3. set -eux -o pipefail
  4.  
  5. BIN_NAME=dub
  6.  
  7. # Allow the script to be run from anywhere
  8. DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
  9. cd $DIR
  10.  
  11. source setup-ldc-windows.sh
  12.  
  13. # Run LDC with cross-compilation
  14. archiveName="$BIN_NAME-$VERSION-$OS-$ARCH_SUFFIX.zip"
  15. echo "Building $archiveName"
  16. mkdir -p bin
  17. DC=ldmd2 DFLAGS="-release" ./build.sh
  18.  
  19. cd bin
  20. mv "${BIN_NAME}" "${BIN_NAME}.exe"
  21. zip "$archiveName" "${BIN_NAME}.exe"