chore: adjustments to the auto build numbering

This commit is contained in:
Stéphane Lesimple
2020-08-19 23:04:20 +02:00
parent 38defdf7aa
commit a4efe71abf
3 changed files with 20 additions and 3 deletions

View File

@@ -75,6 +75,10 @@ ${BUILDTMP}/%.o : %.c
all: time-stamp dvdisaster
${BUILDTMP}/build.o : build.c build.h
@echo "Compiling:" build.o
@$(CC) $(COPTS) -c build.c -o $@
# Building the dvdisaster binary
time-stamp:

3
configure vendored
View File

@@ -9,6 +9,9 @@ DEBUG_CFLAGS="-ggdb -Wall"
if [ "$CLI_ONLY" = 1 ]; then
REQUIRED_CFLAGS="-DCLI $REQUIRED_CFLAGS"
echo '#define FLAVOR CLI' > build.h
else
echo '#define FLAVOR GUI' > build.h
fi
CFG_USE_CYGWIN="no" # do not change

View File

@@ -1,7 +1,17 @@
#!/usr/bin/env bash
build=$(grep BUILD $1 | cut -d\ -f3)
build=$(grep BUILDNUM $1 2>/dev/null | cut -d\ -f3)
build=$((build+1))
echo "#define BUILD $build" >$1
flavor=$(grep FLAVOR $1 2>/dev/null | cut -d\ -f3)
if [ -z "$flavor" ]; then
flavor=UNKNOWN
fi
echo "#define FLAVOR $flavor" >$1
echo "#define BUILDNUM $build" >>$1
if git describe >/dev/null 2>/dev/null; then
gitver=$(git describe)
echo "#define BUILD \"$(git describe)-$flavor-speed47.build$build\"" >>$1
else
echo "#define BUILD \"$flavor-speed47.build$build\"" >$1
fi
date=$(date +"%d.%m.%y (%A, %H:%M)")
echo "#define BDATE \"$date\"" >>$1