Newer
Older
dub_jkp / scripts / ci / release-windows.sh
@Geod24 Geod24 on 6 Jan 2020 501 bytes Move most CI scripts in scripts/ci
  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. # Setup cross compiler
  12. source scripts/ci/setup-ldc-windows.sh
  13.  
  14. # Run LDC with cross-compilation
  15. archiveName="$BIN_NAME-$VERSION-$OS-$ARCH_SUFFIX.zip"
  16. echo "Building $archiveName"
  17. mkdir -p bin
  18. DMD=ldmd2 ldc2 -run ./build.d -release ${LDC_XDFLAGS}
  19.  
  20. cd bin
  21. zip "$archiveName" "${BIN_NAME}.exe"