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)
|
done < <(find "${builddir}/files" -name '*.tpl' -print0)
|
||||||
|
|
||||||
#insert actual firware version informations into release file
|
#insert actual firware version informations into release file
|
||||||
|
variant=$(cat selected_variant)
|
||||||
version=$(git describe --tags --dirty)
|
version=$(git describe --tags --dirty)
|
||||||
if [ 0 -ne $? ]; then
|
if [ 0 -ne $? ]; then
|
||||||
version=$(git log -1 --pretty=format:%h)
|
version=$(git log -1 --pretty=format:%h)
|
||||||
fi
|
fi
|
||||||
if [ -n "$(cat selected_variant)" ]; then
|
if [ -n "$variant" ]; then
|
||||||
version="$(cat selected_variant)-$version"
|
version="$variant-$version"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
{
|
{
|
||||||
echo "FIRMWARE_VERSION=\"$version\""
|
echo "FIRMWARE_VERSION=\"$version\""
|
||||||
|
echo "VARIANT=\"$variant\""
|
||||||
echo "BUILD_DATE=\"build date: $(date)\""
|
echo "BUILD_DATE=\"build date: $(date)\""
|
||||||
echo "OPENWRT_CORE_REVISION=\"${OPENWRTREV}\""
|
echo "OPENWRT_CORE_REVISION=\"${OPENWRTREV}\""
|
||||||
echo "OPENWRT_FEEDS_PACKAGES_REVISION=\"${PACKAGEREV}\""
|
echo "OPENWRT_FEEDS_PACKAGES_REVISION=\"${PACKAGEREV}\""
|
||||||
|
|
Loading…
Reference in New Issue