Enhaced VersionString. The build script is too complex.
[brdnet.git] / build.sh
blob1f1e0b264f5a520406748927c6976d846d5ca7c9
1 #!/bin/bash
2 set -e
3 mkdir -p bin
4 gitver=$(git describe --always --dirty --abbrev=16 --tags || true)
5 const(){ eval "$1"; }
6 BUILD_VERSION=0
7 source gitver.inc||: 2>/dev/null
8 (( buildver= BUILD_VERSION + 1 ))
9 echo Git version: $gitver Build: $buildver
10 echo "const GIT_VERSION='$gitver';
11 const BUILD_VERSION=$buildver;" >gitver.inc
12 make -C ed25519
13 fpc @fpopt.cfg bnprof.pas
14 fpc @fpopt.cfg bnmut.pas
15 fpc @fpopt.cfg bnc.pas
16 fpc @fpopt.cfg brodnetd.pas
17 ln -f -t ./ bin/brodnetd bin/bnprof bin/bnc bin/bnmut