Mark a1108 dejavu release and rebuild image
Group all previously unreleased changes under Build a1108 / dejavu, update README, MANUAL, AGENTS and battery analysis for the current release, add release codename support to scripts/version.sh and check-rebuild.sh, update os-release/issue/motd templates including usr/lib/os-release, rebuild the image under a1108, and deploy the same release metadata to the live phone.
This commit is contained in:
1 parent
608a8ac71b
commit
8448b6465f
13 files changed
+104
-47
No files matched your search
@@ -302,9 +302,21 @@ if ! command -v docker >/dev/null 2>&1; then
|
||||
fi
|
||||
|
||||
echo "[check] Version helper..."
|
||||
if ! "$BASE_DIR/scripts/version.sh" --print >/dev/null 2>&1; then
|
||||
fail "scripts/version.sh --print failed"
|
||||
VERSION="$("$BASE_DIR/scripts/version.sh" --print 2>/dev/null || true)"
|
||||
CODENAME="$("$BASE_DIR/scripts/version.sh" --print-codename 2>/dev/null || true)"
|
||||
if [ "$VERSION" != "a1108" ]; then
|
||||
fail "scripts/version.sh --print must return a1108"
|
||||
fi
|
||||
if [ "$CODENAME" != "dejavu" ]; then
|
||||
fail "scripts/version.sh --print-codename must return dejavu"
|
||||
fi
|
||||
for f in overlay/rootfs/etc/os-release overlay/rootfs/usr/lib/os-release overlay/rootfs/etc/issue overlay/rootfs/etc/motd; do
|
||||
if [ ! -f "$BASE_DIR/$f" ]; then
|
||||
fail "missing $f"
|
||||
elif ! grep -q '@BANANARCHY_VERSION@' "$BASE_DIR/$f" || ! grep -q '@BANANARCHY_CODENAME@' "$BASE_DIR/$f"; then
|
||||
fail "$f lost its version/codename placeholders"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$FAILURES" -ne 0 ]; then
|
||||
echo "[check] $FAILURES check(s) failed."
|
||||
|
||||
+22
-4
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# Compute and apply the Bananarchy Linux release version:
|
||||
# Compute and apply the Bananarchy Linux release version and codename:
|
||||
# <year-letter><MM><DD>
|
||||
# where <year-letter> is 'a'..'z' for (year - 2026) mod 26 (2026 = 'a'),
|
||||
# followed by the two-digit local month and two-digit local day.
|
||||
@@ -15,10 +15,25 @@ LETTER_IDX=$(( ((YEAR - 2026) % 26 + 26) % 26 ))
|
||||
YEAR_LETTER="$(printf "\\$(printf '%03o' $(( 97 + LETTER_IDX )))")"
|
||||
VERSION="${BANANARCHY_VERSION:-${YEAR_LETTER}${MONTH}${DAY}}"
|
||||
|
||||
case "$VERSION" in
|
||||
a1108) DEFAULT_CODENAME=dejavu ;;
|
||||
a1105) DEFAULT_CODENAME=vendetta ;;
|
||||
a1031) DEFAULT_CODENAME=myers ;;
|
||||
a1028) DEFAULT_CODENAME=ladyjava ;;
|
||||
a1027) DEFAULT_CODENAME=bonkers ;;
|
||||
a1025) DEFAULT_CODENAME=argonaut ;;
|
||||
*) DEFAULT_CODENAME=unknown ;;
|
||||
esac
|
||||
CODENAME="${BANANARCHY_CODENAME:-$DEFAULT_CODENAME}"
|
||||
|
||||
if [ "${1:-}" = "--print" ] || [ "${1:-}" = "-p" ]; then
|
||||
printf '%s\n' "$VERSION"
|
||||
exit 0
|
||||
fi
|
||||
if [ "${1:-}" = "--print-codename" ] || [ "${1:-}" = "-c" ]; then
|
||||
printf '%s\n' "$CODENAME"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
TARGET_ROOTFS="${1:-${ROOTFS_DIR:-$BASE_DIR/rootfs}}"
|
||||
|
||||
@@ -27,20 +42,23 @@ apply_template() {
|
||||
dst_file="$2"
|
||||
if [ -f "$src_tpl" ]; then
|
||||
mkdir -p "$(dirname "$dst_file")"
|
||||
sed "s/@BANANARCHY_VERSION@/$VERSION/g" "$src_tpl" > "$dst_file"
|
||||
sed -e "s/@BANANARCHY_VERSION@/$VERSION/g" \
|
||||
-e "s/@BANANARCHY_CODENAME@/$CODENAME/g" \
|
||||
"$src_tpl" > "$dst_file"
|
||||
elif [ -f "$dst_file" ]; then
|
||||
sed -i -E \
|
||||
-e "s/@BANANARCHY_VERSION@/$VERSION/g" \
|
||||
-e "s/@BANANARCHY_CODENAME@/$CODENAME/g" \
|
||||
-e "s/v0\.0\.1/$VERSION/g" \
|
||||
"$dst_file"
|
||||
fi
|
||||
}
|
||||
|
||||
if [ -d "$TARGET_ROOTFS" ]; then
|
||||
for rel in etc/os-release etc/issue etc/motd; do
|
||||
for rel in etc/os-release usr/lib/os-release etc/issue etc/motd; do
|
||||
apply_template "$BASE_DIR/overlay/rootfs/$rel" "$TARGET_ROOTFS/$rel"
|
||||
done
|
||||
echo "Applied Bananarchy version $VERSION to $TARGET_ROOTFS"
|
||||
echo "Applied Bananarchy version $VERSION ($CODENAME) to $TARGET_ROOTFS"
|
||||
else
|
||||
printf '%s\n' "$VERSION"
|
||||
fi
|
||||
Reference in new issue
Block a user