mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-06 19:20:45 +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
|
#!/bin/bash
|
||||||
|
|
||||||
MY_PATH="`dirname \"$0\"`"
|
MY_PATH="`dirname \"$0\"`"
|
||||||
if [ ! -f "$MY_PATH/ReleaseMode" ]
|
if [ -f "$MY_PATH/build_number" ]
|
||||||
then
|
then
|
||||||
echo "Skipping build number update"
|
|
||||||
exit;
|
|
||||||
fi
|
|
||||||
echo "Updating build number"
|
|
||||||
number=`cat $MY_PATH/build_number`
|
number=`cat $MY_PATH/build_number`
|
||||||
let number++
|
else
|
||||||
echo "$number" > $MY_PATH/build_number
|
number=0
|
||||||
echo "const int build_number = ""$number;" | tee $MY_PATH/../build_number.h
|
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 {
|
unix {
|
||||||
CONFIG(release, debug|release) {
|
# Update build number
|
||||||
# Update build number
|
CONFIG(release, debug|release) {
|
||||||
build_nr.commands = $$PWD/scripts/inc_build.sh
|
build_nr.commands = $$PWD/scripts/inc_build.sh release
|
||||||
build_nr.depends = FORCE
|
} else {
|
||||||
QMAKE_EXTRA_TARGETS += build_nr
|
build_nr.commands = $$PWD/scripts/inc_build.sh debug
|
||||||
PRE_TARGETDEPS += build_nr
|
|
||||||
|
|
||||||
HEADERS += build_number.h
|
|
||||||
}
|
}
|
||||||
|
build_nr.depends = FORCE
|
||||||
|
QMAKE_EXTRA_TARGETS += build_nr
|
||||||
|
PRE_TARGETDEPS += build_nr
|
||||||
|
|
||||||
|
HEADERS += build_number.h
|
||||||
}
|
}
|
||||||
|
|
||||||
#include(..3rdparty/qextserialport/src/qextserialport.pri)
|
#include(..3rdparty/qextserialport/src/qextserialport.pri)
|
||||||
|
Loading…
Reference in New Issue
Block a user