File: release-windows.sh

package info (click to toggle)
dub 1.16.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,168 kB
  • sloc: sh: 1,577; xml: 37; makefile: 17; ansic: 11
file content (21 lines) | stat: -rwxr-xr-x 481 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env bash
# Build the Windows binaries under Linux
set -eux -o pipefail

BIN_NAME=dub

# Allow the script to be run from anywhere
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR

source setup-ldc-windows.sh

# Run LDC with cross-compilation
archiveName="$BIN_NAME-$VERSION-$OS-$ARCH_SUFFIX.zip"
echo "Building $archiveName"
mkdir -p bin
DC=ldmd2 DFLAGS="-release" ./build.sh

cd bin
mv "${BIN_NAME}" "${BIN_NAME}.exe"
zip "$archiveName" "${BIN_NAME}.exe"