mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 01:13:00 +02:00
board/common: append $INFIX_RELEASE to artifact names
This patch affects the various artiact file names in release tarballs. The files /etc/os-release and /etc/version in the image use the actual GIT commit (git describe), as per post-build.sh Guiding principle: artifacts without release suffix are development or "nightly" builds. Artifacts *with* release suffix are released ones. This drops the $GITVER from .img files for consistency with the other artifacts, e.g. .gns3a and .pkg. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
NM="${1:-custom}"
|
||||
if [ -n "$INFIX_RELEASE" ]; then
|
||||
rel="-${INFIX_RELEASE}"
|
||||
fi
|
||||
|
||||
NM="${1:-custom}${rel}"
|
||||
RAM=${2:-512}
|
||||
IFNUM=${3:-1}
|
||||
|
||||
|
||||
@@ -3,8 +3,11 @@
|
||||
set -e
|
||||
|
||||
GIT_VERSION=$(git -C $BR2_EXTERNAL_INFIX_PATH describe --always --dirty --tags)
|
||||
if [ -n "$INFIX_RELEASE" ]; then
|
||||
rel="-${INFIX_RELEASE}"
|
||||
fi
|
||||
|
||||
name=$1
|
||||
name=$1${rel}
|
||||
arch=$2
|
||||
sign=$3
|
||||
|
||||
|
||||
+10
-14
@@ -8,16 +8,10 @@ NAME=infix-$(basename "$BR2_DEFCONFIG" _defconfig | tr _ - | sed 's/x86-64/x86_6
|
||||
|
||||
ver()
|
||||
{
|
||||
[ -n "$RELEASE" ] || return
|
||||
GITVER=$(git describe --tags --dirty)
|
||||
if echo "$GITVER" |grep -q 'latest-'; then
|
||||
latest=$(echo "$GITVER" | sed 's/latest-[0-9]*-\(g.*\)/\1/')
|
||||
cd "$BR2_EXTERNAL_INFIX_PATH/buildroot" || exit 1
|
||||
br2ver=$(git describe --tags --dirty | sed 's/..\([^-]*\).*/\1/g')
|
||||
cd - || exit 1
|
||||
GITVER=$br2ver-$latest
|
||||
if [ -n "$INFIX_RELEASE" ]; then
|
||||
printf -- "-%s" "$INFIX_RELEASE"
|
||||
return
|
||||
fi
|
||||
printf "-%s" "$GITVER"
|
||||
}
|
||||
|
||||
load_cfg SIGN_ENABLED
|
||||
@@ -53,10 +47,12 @@ if [ "$FIT_IMAGE" = "y" ]; then
|
||||
$common/mkfit.sh
|
||||
fi
|
||||
|
||||
# For use outside of the build system, e.g., Qeneth
|
||||
if [ -z "${NAME##*minimal*}" ]; then
|
||||
COMMON_NAME=$(echo "$NAME" | sed 's/-minimal//')
|
||||
ln -sf rootfs.squashfs "$BINARIES_DIR/$COMMON_NAME$(ver).img"
|
||||
else
|
||||
ln -sf rootfs.squashfs "$BINARIES_DIR/$NAME$(ver).img"
|
||||
NAME=$(echo "$NAME" | sed 's/-minimal//')
|
||||
fi
|
||||
|
||||
rel=$(ver)
|
||||
ln -sf rootfs.squashfs "$BINARIES_DIR/${NAME}${rel}.img"
|
||||
if [ -n "$rel" ]; then
|
||||
ln -sf "$BINARIES_DIR/${NAME}${rel}.img" "$BINARIES_DIR/${NAME}.img"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user