mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 10:40:42 +00:00
Fix build_number.h not being created properly
This commit is contained in:
parent
7e7d87f143
commit
74a9b3379b
@ -1 +0,0 @@
|
||||
47
|
@ -1,12 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
MY_PATH="`dirname \"$0\"`"
|
||||
if [ ! -f "$MY_PATH/ReleaseMode" ]
|
||||
if [ -f "$MY_PATH/build_number" ]
|
||||
then
|
||||
echo "Skipping build number update"
|
||||
exit;
|
||||
fi
|
||||
echo "Updating build number"
|
||||
number=`cat $MY_PATH/build_number`
|
||||
let number++
|
||||
echo "$number" > $MY_PATH/build_number
|
||||
echo "const int build_number = ""$number;" | tee $MY_PATH/../build_number.h
|
||||
else
|
||||
number=0
|
||||
fi
|
||||
|
||||
if [ ! "$1" == "release" ]
|
||||
then
|
||||
echo "Updating build number"
|
||||
let number++
|
||||
echo "$number" > $MY_PATH/build_number
|
||||
echo "const int build_number = ""$number;" | tee $MY_PATH/../build_number.h
|
||||
else
|
||||
echo "Skipping build number update"
|
||||
# But create anyway if it doesn't exist
|
||||
if [ ! -f $MY_PATH/../build_number.h ]
|
||||
then
|
||||
echo "const int build_number = ""$number;" | tee $MY_PATH/../build_number.h
|
||||
fi
|
||||
fi
|
||||
|
@ -100,15 +100,17 @@ win32 {
|
||||
}
|
||||
|
||||
unix {
|
||||
CONFIG(release, debug|release) {
|
||||
# Update build number
|
||||
build_nr.commands = $$PWD/scripts/inc_build.sh
|
||||
build_nr.depends = FORCE
|
||||
QMAKE_EXTRA_TARGETS += build_nr
|
||||
PRE_TARGETDEPS += build_nr
|
||||
|
||||
HEADERS += build_number.h
|
||||
# Update build number
|
||||
CONFIG(release, debug|release) {
|
||||
build_nr.commands = $$PWD/scripts/inc_build.sh release
|
||||
} else {
|
||||
build_nr.commands = $$PWD/scripts/inc_build.sh debug
|
||||
}
|
||||
build_nr.depends = FORCE
|
||||
QMAKE_EXTRA_TARGETS += build_nr
|
||||
PRE_TARGETDEPS += build_nr
|
||||
|
||||
HEADERS += build_number.h
|
||||
}
|
||||
|
||||
#include(..3rdparty/qextserialport/src/qextserialport.pri)
|
||||
|
Loading…
Reference in New Issue
Block a user