-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCAAGBQJbGrPRAAoJEOPQILQNRairbNQQAKDzxypJ5XjWhgBl9mALP4ia
 jPAZhaUXrPNNXmTVc6X09BwMPEqldC51AbMM2x7b81g6IjxEi4mk38yOy+ZAVaaX
 GMEHHXrSX6PspCxBgjICOkYEy2ADZkZ1PfpZrv93fNVLQb1rRdGnOV8sxLqCMdiJ
 IpYasQoFSiJFgjhaZPvY9/mTcV701OXrRQrLjpEhjJM3hWsXjs9x2VukcImebaOE
 OidjUqGDlqVNTBnNRNihJ6n47sZBredUeTyRG5eCdaoXUGQe4kToo96kX2LefObr
 JSXAkAdVuNFq4Ffk9F/wXL6NyR197c1Y5x5MDMFv+bF7COQt7K0PsAIX7whw5y9S
 LHfuopY/2hyHad5qW6T1itIFVESIRXNGk6DkLeZ2MnozbyByjEVam3gOkRCKYdIw
 R205SVyB9CVLOZ/jw/gEROc9dBqDkh0lsIAYhQuWHV3tqr3vxqj2L/X1w8IsJu64
 2ldMvz4ZkgcaE0h2SWm1ZAeyag5nTXJG/rJ2F7lY/lBd3NNDHNtygyKtLtO+cMdd
 i33zwif22tDAm1IF6A8JFIWZvCwONleffX5B3FKnozKWPln60GFdcEP6BUeoPTp+
 DGHpKcHFZpfbWvlqhdpDf4dkCHjehlUuTCSqnG+LWp13GgDxuX+v/iQOmIpMQlSJ
 dJnlL9Or+QrNhqzyqyFE
 =5WQY
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCAAGBQJbGrPRAAoJEOPQILQNRairJW0P/2+P9IGiHdJtrOrU7OBiT4Ml
 xYawWos4FILLHgoj/W3zPUqSkMCq1w4WcvOKG4A3eHaC6+xnyDQwN6uCysfd2tIO
 Pk8Afam5g+EpFf9ZnjnxChpBKIb3UHplkdKcL0tWCvzBjRbXycR3pxW/UVx8WQ+V
 UY3S9lcgbZW7PBBRZbCPRhviFZnNL48apN+pVGmV7gWc0BNpA8muFTL/I7bA+gpP
 MEZ6xYC+xV+1qKoJ9oyxAC/LUwt0nsw2uWc/y+C55hhKUdOchQDboc8V7ythBdCT
 c83hpvrnElvbxKpaKsWJs6+rL8Cvp3ongKh/4sdGKLK44HKmU/usNk70dbDI7oTa
 dHxjq1Cyl6cPJ4Xmmhpxke2UEvS6vPKdcRXJDVtopKVssWZqGlnfDrPmdGICnFqc
 g0yxKMxu7LN6dHczCaVPmLc77TbBhJyAF4taMnFY539P/ME0cnOXPQNdBSK4uO+C
 44zydEPVLPrf/y1hYQS1u+So/klUNxFR/9JCNBcSat9QqneUL6vS+kx97MSXGq8p
 oNvndoI3uzoju6UmEgKLm3+1iTBLAieZPDRCOgFXvfksgr3HjZEdJU+QyqtKARuV
 hjWMM/QIFO3vutOSn5Asqc/wgQBpyUrHoMmm0dGptGOW3S8XauFkW5D7z78+Slbm
 xD+cPH9UHku04aaY0/Eb
 =6HPM
 -----END PGP SIGNATURE-----

Merge tag v0.8.1 into v0.x.x
v0.8.1

# gpg: Signature made Fri 08 Jun 2018 18:50:25 CEST
# gpg:                using RSA key E3D020B40D45A8AB
# gpg: Good signature from "Leandro Lucarella <leandro.lucarella@sociomantic.com>"

* tag 'v0.8.1':
  Update Windows Travis Deploy Regex ()
  Deploy binaries to GitHub releases (Linux/MacOS) ()
This commit is contained in:
Leandro Lucarella 2018-06-08 18:50:25 +02:00
commit 4fd89f1f41
4 changed files with 103 additions and 0 deletions

View File

@ -43,3 +43,55 @@ jobs:
on:
tags: true # must be a git tag
repo: dlang-community/dfmt # must be a tag on dlang-community
- stage: GitHub Release
#if: tag IS present
d: ldc-1.8.0
os: linux
script: echo "Deploying to GitHub releases ..." && ./release.sh
deploy:
provider: releases
api_key: $GH_REPO_TOKEN
file_glob: true
file: bin/dfmt-*.tar.gz
skip_cleanup: true
on:
repo: dlang-community/dfmt
tags: true
- stage: GitHub Release
#if: tag IS present
d: ldc-1.8.0
os: osx
script: echo "Deploying to GitHub releases ..." && ./release.sh
deploy:
provider: releases
api_key: $GH_REPO_TOKEN
file_glob: true
file: bin/dfmt-*.tar.gz
skip_cleanup: true
on:
repo: dlang-community/dfmt
tags: true
- stage: GitHub Release
#if: tag IS present
d: dmd
os: linux
language: generic
sudo: yes
script: echo "Deploying to GitHub releases ..." && ./release-windows.sh
addons:
apt:
packages:
- p7zip-full
- wine
deploy:
provider: releases
api_key: $GH_REPO_TOKEN
file_glob: true
file: bin/dfmt-*.zip
skip_cleanup: true
on:
repo: dlang-community/dfmt
tags: true
stages:
- name: test
if: type = pull_request or (type = push and branch = master)

View File

@ -44,3 +44,6 @@ pkg: dmd
clean:
$(RM) bin/dfmt
release:
./release.sh

25
release-windows.sh Executable file
View File

@ -0,0 +1,25 @@
#!/usr/bin/env bash
# Build the Windows binaries under Linux (requires wine)
set -eux -o pipefail
VERSION=$(git describe --abbrev=0 --tags)
OS=windows
ARCH_SUFFIX="x86"
# Allow the script to be run from anywhere
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR
# Step 1: download the DMD binaries
if [ ! -d dmd2 ] ; then
wget http://downloads.dlang.org/releases/2.x/2.079.0/dmd.2.079.0.windows.7z
7z x dmd.2.079.0.windows.7z > /dev/null
fi
# Step 2: Run DMD via wineconsole
archiveName="dfmt-$VERSION-$OS-$ARCH_SUFFIX.zip"
echo "Building $archiveName"
mkdir -p bin
DC="$DIR/dmd2/windows/bin/dmd.exe" wine cmd /C build.bat
cd bin
zip "$archiveName" dfmt.exe

23
release.sh Executable file
View File

@ -0,0 +1,23 @@
#!/usr/bin/env bash
set -eux -o pipefail
VERSION=$(git describe --abbrev=0 --tags)
ARCH="${ARCH:-64}"
LDC_FLAGS=()
unameOut="$(uname -s)"
case "$unameOut" in
Linux*) OS=linux; LDC_FLAGS=("-flto=full" "-linker=gold" "-static") ;;
Darwin*) OS=osx; LDC_FLAGS+=("-L-macosx_version_min" "-L10.7" "-L-lcrt1.o"); ;;
*) echo "Unknown OS: $unameOut"; exit 1
esac
case "$ARCH" in
64) ARCH_SUFFIX="x86_64";;
32) ARCH_SUFFIX="x86";;
*) echo "Unknown ARCH: $ARCH"; exit 1
esac
archiveName="dfmt-$VERSION-$OS-$ARCH_SUFFIX.tar.gz"
echo "Building $archiveName"
${MAKE:-make} ldc LDC_FLAGS="${LDC_FLAGS[*]}"
tar cvfz "bin/$archiveName" -C bin dfmt