v0.0.4 - Remove incomplete n_signer glue, update services/smoketest, add ISO version stamping, and include custom console fonts
This commit is contained in:
40
build.sh
40
build.sh
@@ -8,6 +8,7 @@ WORKSPACE_ISO="$WORKSPACE_ISO_DIR/live-image-amd64.hybrid.iso"
|
||||
BUILD_LOG="$WORKSPACE_ISO_DIR/build.log"
|
||||
ARTIFACTS_DIR="$WORKSPACE_ISO_DIR/config/includes.chroot_before_packages/live-artifacts"
|
||||
BUILD_BINARIES_SCRIPT="$REPO_ROOT/scripts/build-binaries.sh"
|
||||
ISSUE_TEMPLATE_PATH="$REPO_ROOT/iso/config/templates/issue.template"
|
||||
|
||||
CLEAN_REQUESTED=0
|
||||
# Fast iteration defaults:
|
||||
@@ -104,6 +105,43 @@ stage_slice_bc_artifacts() {
|
||||
"$BUILD_BINARIES_SCRIPT"
|
||||
}
|
||||
|
||||
determine_build_version() {
|
||||
local latest_tag
|
||||
latest_tag="$(git -C "$REPO_ROOT" tag -l 'v*.*.*' | sort -V | tail -n 1 || true)"
|
||||
|
||||
if [[ -z "$latest_tag" ]]; then
|
||||
latest_tag="v0.0.0"
|
||||
echo "[build.sh] warning: no semantic git tags found; defaulting to $latest_tag"
|
||||
fi
|
||||
|
||||
local short_hash
|
||||
short_hash="$(git -C "$REPO_ROOT" rev-parse --short HEAD)"
|
||||
|
||||
BUILD_VERSION_STRING="n-os-tr ${latest_tag} (${short_hash})"
|
||||
}
|
||||
|
||||
stage_version_metadata() {
|
||||
determine_build_version
|
||||
|
||||
local version_dir="$BUILD_DIR/config/includes.chroot/etc/n-os-tr"
|
||||
local version_file="$version_dir/version"
|
||||
local issue_file="$BUILD_DIR/config/includes.chroot/etc/issue"
|
||||
|
||||
mkdir -p "$version_dir"
|
||||
printf '%s\n' "$BUILD_VERSION_STRING" > "$version_file"
|
||||
|
||||
if [[ ! -f "$ISSUE_TEMPLATE_PATH" ]]; then
|
||||
echo "[build.sh] missing issue template: $ISSUE_TEMPLATE_PATH" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sed "s|__N_OS_TR_VERSION__|$BUILD_VERSION_STRING|g" "$ISSUE_TEMPLATE_PATH" > "$issue_file"
|
||||
|
||||
echo "[build.sh] stamped version: $BUILD_VERSION_STRING"
|
||||
echo "[build.sh] wrote: $version_file"
|
||||
echo "[build.sh] rendered: $issue_file"
|
||||
}
|
||||
|
||||
if [[ "$CLEAN_REQUESTED" -eq 1 ]]; then
|
||||
cleanup_artifacts
|
||||
fi
|
||||
@@ -146,6 +184,8 @@ if [[ ! -d "$BUILD_DIR" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
stage_version_metadata
|
||||
|
||||
if [[ "$ISO_ONLY" -eq 1 ]]; then
|
||||
echo "[build.sh] fast mode: skipping includes/ binary rebuild"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user