Skip to content

Commit b3da3e6

Browse files
committed
board/common: generate version info similar to Infix
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
1 parent 85ee76b commit b3da3e6

2 files changed

Lines changed: 5 additions & 10 deletions

File tree

board/common/post-build.sh

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,8 @@ done
99
# because by default container runtimes manage all networking.
1010
rm "${TARGET_DIR}/etc/network/interfaces"
1111

12-
if [ -z "$GIT_VERSION" ]; then
13-
GIT_VERSION=$(git -C "$BR2_EXTERNAL_CURIOS_PATH" describe --always --dirty --tags)
14-
fi
15-
16-
# Override VERSION in /etc/os-release and filenames for release builds
17-
if [ -n "$RELEASE" ]; then
18-
VERSION="$RELEASE"
19-
else
20-
VERSION=$GIT_VERSION
21-
fi
12+
VERSION="${CURIOS_VERSION}"
13+
GIT_VERSION="${CURIOS_BUILD_ID}"
2214

2315
# Buildroot original remain in /usr/lib/os-release
2416
rm "${TARGET_DIR}/etc/os-release"

external.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
include $(sort $(wildcard $(BR2_EXTERNAL_CURIOS_PATH)/package/*/*.mk))
22

3+
export CURIOS_BUILD_ID ?= $(shell git -C $(BR2_EXTERNAL_CURIOS_PATH) describe --dirty --always --tags)
4+
export CURIOS_VERSION = $(if $(RELEASE),$(RELEASE),$(CURIOS_BUILD_ID))
5+
36
.PHONY: upload
47
upload: all
58
(cd $O/images; skopeo copy oci:rootfs-oci:edge docker://ghcr.io/kernelkit/curios:edge)

0 commit comments

Comments
 (0)