Removed BUILD_VERSION from python translation
Add. new version.h, which included now the build version. Adapted build.sh - to extract the build version from versioh.h and sends it to translation script.
This commit is contained in:
@@ -8,6 +8,7 @@ AVAILABLE_LANGUAGES=()
|
||||
BUILD_LANGUAGES=()
|
||||
AVAILABLE_MODELS=("TS100" "TS80")
|
||||
BUILD_MODELS=()
|
||||
BUILD_VERSION=()
|
||||
|
||||
usage ()
|
||||
{
|
||||
@@ -22,6 +23,14 @@ INFO : By default, without parameters, the build is for all platforms and all la
|
||||
exit 1
|
||||
}
|
||||
|
||||
buildVersion ()
|
||||
{
|
||||
GIT_HASH="$(git describe --always)"
|
||||
VERSION="$(grep '#define BUILD_VERSION' 'version.h' | awk '{print $3}' | sed 's/"//g')"
|
||||
BUILD_VERSION=$VERSION'.'$GIT_HASH
|
||||
echo "Building version: $BUILD_VERSION"
|
||||
}
|
||||
|
||||
checkLastCommand ()
|
||||
{
|
||||
if [ $? -eq 0 ]
|
||||
@@ -78,6 +87,11 @@ echo " Builder for the"
|
||||
echo " Alternate Open Source Firmware"
|
||||
echo " for Miniware TS100 or TS80"
|
||||
echo " by Ralim"
|
||||
echo " "
|
||||
echo "*********************************************"
|
||||
|
||||
#Get and show build version
|
||||
buildVersion
|
||||
echo "*********************************************"
|
||||
|
||||
# Calculate available languages
|
||||
@@ -129,7 +143,7 @@ echo "*********************************************"
|
||||
if [ ${#BUILD_LANGUAGES[@]} -gt 0 ] && [ ${#BUILD_MODELS[@]} -gt 0 ]
|
||||
then
|
||||
echo "Generating Translation.cpp"
|
||||
python3 "$TRANSLATION_DIR/$TRANSLATION_SCRIPT" "$TRANSLATION_DIR"
|
||||
python3 "$TRANSLATION_DIR/$TRANSLATION_SCRIPT" "$BUILD_VERSION" "$TRANSLATION_DIR"
|
||||
checkLastCommand
|
||||
|
||||
echo "Cleaning previous builds"
|
||||
|
||||
7
workspace/TS100/version.h
Normal file
7
workspace/TS100/version.h
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* Firmware build version - format: xx.yy.zzzzzz
|
||||
* x: Major - y: Minor - z: git short hash generated automaticaly from git
|
||||
* i.e.: BUILD_VERSION = 'Rel. v2.08' --> Will generated to: 'v2.08.1a2b3c4'
|
||||
*/
|
||||
|
||||
#define BUILD_VERSION "v2.08"
|
||||
Reference in New Issue
Block a user