mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-03 06:13:02 +02:00
common/post-build: Use infix's version, not buildroot's, in os-release
This way we can more easily know exactly from which commit an image was built.
This commit is contained in:
@@ -1,15 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
GIT_VERSION=$(git -C $BR2_EXTERNAL_INFIX_PATH describe --always --dirty --tags)
|
||||
|
||||
# This is a symlink to /usr/lib/os-release, so we remove this to keep
|
||||
# original Buildroot information.
|
||||
rm "$TARGET_DIR/etc/os-release"
|
||||
{
|
||||
echo "NAME=\"Inf/IX\""
|
||||
echo "VERSION=${BR2_VERSION}"
|
||||
echo "VERSION=${GIT_VERSION}"
|
||||
echo "ID=infix"
|
||||
echo "VERSION_ID=${BR2_VERSION}"
|
||||
echo "VERSION_ID=${GIT_VERSION}"
|
||||
echo "PRETTY_NAME=\"Inf/IX by KernelKit\""
|
||||
echo "HOME_URL=https://github.com/KernelKit"
|
||||
} > "$TARGET_DIR/etc/os-release"
|
||||
|
||||
echo "Inf/IX by KernelKit $BR2_VERSION -- $(date +"%b %e %H:%M %Z %Y")" > "$TARGET_DIR/etc/version"
|
||||
echo "Inf/IX by KernelKit $GIT_VERSION -- $(date +"%b %e %H:%M %Z %Y")" > "$TARGET_DIR/etc/version"
|
||||
|
||||
Reference in New Issue
Block a user