From d1ba94ea0842c2e464f2c9177529de5319c8a33f Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sun, 8 Oct 2023 02:34:50 +0100 Subject: update/release/*: merge to update/project/release The logic has been re-written, where source archives are concerned. This clones the current repository, and starts a new build from scratch. A custom release directory is possible, by passing -d This eliminates a step during build-testing, saving hours of time, because it builds the release archive *inside* the release archive, with git files removed, thus replicating the same setup that the user would have. This also makes everything a bit more consistent, because it's guaranteed that a release archive will always have the same files; previously, the release build script would only copy what was already built, without building anything. Now, this script builds everything itself. The script also builds serprog images, not just coreboot. Usage: ./update project release If -d is not passed, release/ is used inside lbmk. Otherwise, you could do: ./update project release -d /path/to/directory If the directory exists, this script will exit (error). Other minor fixes: build/fw/coreboot: make version in coreboot-version (file) not contain hyphens, to work around a quirk in coreboot's build system when not building on regular libreboot releases. this quirk only appears when lbmk is not being compiled under git. The other main benefit of this change is that the new script will probably require a lot less maintenance. Signed-off-by: Leah Rowe --- script/update/project/trees | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'script/update/project/trees') diff --git a/script/update/project/trees b/script/update/project/trees index 1055d500..7df3c8bf 100755 --- a/script/update/project/trees +++ b/script/update/project/trees @@ -11,7 +11,7 @@ set -u -e . "include/option.sh" . "include/git.sh" -export LOCALVERSION="-${projectname}-${version}" +export LOCALVERSION="-${projectname}-${version%%-*}" eval "$(setvars "" arch cfgsdir codedir config config_name crossgcc_ada mode \ elfdir listfile project romtype target target_dir targets tree cbfstool _f \ @@ -271,9 +271,9 @@ run_make_command() [ -f "${codedir}/Makefile" ] || [ -f "${codedir}/makefile" ] || \ [ -f "${codedir}/GNUmakefile" ] || return 1 [ "${project}" = "coreboot" ] && [ -z "${mode}" ] && \ - x_ printf "%s\n" "${version}" >"${codedir}/.coreboot-version" + x_ printf "%s\n" "${version%%-*}" >"${codedir}/.coreboot-version" - x_ make -C "${codedir}" -j$(nproc) ${mode} + x_ make ${mode} -j$(nproc) -C "${codedir}" [ "${mode}" != "clean" ] && return 0 make -C "${codedir}" distclean 2>/dev/null || : } -- cgit v1.2.1