forked from freifunk-franken/firmware
buildscript: add variant information to firmware_release
This also introduces a variant variable in our buildscript, as it is necessery multiple times in the build process. Signed-off-by: Fabian Bläse <fabian@blaese.de> Reviewed-by: Christian Dresel <fff@chrisi01.de>
This commit is contained in:
parent
87f6f9969f
commit
84a937b798
|
@ -200,16 +200,18 @@ prebuild() {
|
|||
done < <(find "${builddir}/files" -name '*.tpl' -print0)
|
||||
|
||||
#insert actual firware version informations into release file
|
||||
variant=$(cat selected_variant)
|
||||
version=$(git describe --tags --dirty)
|
||||
if [ 0 -ne $? ]; then
|
||||
version=$(git log -1 --pretty=format:%h)
|
||||
fi
|
||||
if [ -n "$(cat selected_variant)" ]; then
|
||||
version="$(cat selected_variant)-$version"
|
||||
if [ -n "$variant" ]; then
|
||||
version="$variant-$version"
|
||||
fi
|
||||
|
||||
{
|
||||
echo "FIRMWARE_VERSION=\"$version\""
|
||||
echo "VARIANT=\"$variant\""
|
||||
echo "BUILD_DATE=\"build date: $(date)\""
|
||||
echo "OPENWRT_CORE_REVISION=\"${OPENWRTREV}\""
|
||||
echo "OPENWRT_FEEDS_PACKAGES_REVISION=\"${PACKAGEREV}\""
|
||||
|
|
Loading…
Reference in New Issue