chip: Fix post-build.sh that used a git Buildroot

This commit is contained in:
Guilhem Baccialone 2024-10-15 23:37:18 +02:00
parent b807ddf7da
commit c0fa3e46da

16
board/nextthing/chip/post-build.sh Normal file → Executable file
View file

@ -1,22 +1,8 @@
#!/bin/bash
TARGET_DIR=$1
BRANCH=$(git symbolic-ref -q HEAD)
BRANCH=${BRANCH##refs/heads/chip/}
BRANCH=${BRANCH##refs/heads/nextthing/*/}
BUILDROOT_GITHASH="$(cat buildroot_githash)"
BUILDROOT_GITHASH="${BUILDROOT_GITHASH:0:8}"
BUILD="$(cat build)"
cat <<EOF >${TARGET_DIR}/etc/issue
Welcome to CHIP Buildroot-${BRANCH} build ${BUILD} rev ${BUILDROOT_GITHASH}
Welcome to CHIP Buildroot-2024.08
CHIP Buildroot contains various open source software.
The source code can be downloaded from:
http://opensource.nextthing.co/chip/buildroot/${BRANCH}/${BUILD}/build${BUILD}.tar.gz
EOF