From patchwork Tue Feb 11 14:28:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 2772 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 48H4sV5wq0z3xyQ for ; Tue, 11 Feb 2020 14:29:18 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 48H4sQ5zhhz12Z; Tue, 11 Feb 2020 14:29:14 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 48H4sP50zVz2yxC; Tue, 11 Feb 2020 14:29:13 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 48H4sM37zZz2yj8 for ; Tue, 11 Feb 2020 14:29:11 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 48H4sM1lkRzvs; Tue, 11 Feb 2020 14:29:11 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909ed25519; t=1581431351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wE9oAD70cfVxTNzjFaDqu2p3w+GC1Kzg4YeVJCCzjIY=; b=qN4SBzDTGM9j1yd9tIM4nFVsXWKq+kwsoG1/QdyzBx3btHLCRb3O9V+z5y5XwXIvDpsaIr jEXbIh4nPkU3U6Cg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909rsa; t=1581431351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wE9oAD70cfVxTNzjFaDqu2p3w+GC1Kzg4YeVJCCzjIY=; b=RkYDkAfUSRyHfdJvpC5wT77iNh083OK5tLCmoWbjtwanCUrLaNhjlDic41cm5oafp5Gq3N kiqR6HzU3FyxUn2yZpQywFQRLfOC9yJwey7GRowClvndSFVhQMahnv95Dc+SijjyaLaTOf gRr1pw4XoDmDdPGPzNI1jtRme4U8qtZJhSwCjcfAshdEmKV2BvXJYzy4C/d83Bwajxm8iO OihEPIliwIWBnVRqbyWealviCIJuf1wPQhG6lY0+8+RHmSnx9byVvN2rTRNqvbSTmh5BQl JKksfx6PGx29zam6+g/6aQfroSlM97xr9zvSR+/GVopFGbZNg87pYrfGuPe0SQ== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 7/8] make.sh: Cleanup code that builds ${SYSTEM_RELEASE} Date: Tue, 11 Feb 2020 14:28:52 +0000 Message-Id: <20200211142853.8561-8-michael.tremer@ipfire.org> In-Reply-To: <20200211142853.8561-1-michael.tremer@ipfire.org> References: <20200211142853.8561-1-michael.tremer@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Tremer Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Signed-off-by: Michael Tremer --- make.sh | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/make.sh b/make.sh index ba393bd65..d46282b8e 100755 --- a/make.sh +++ b/make.sh @@ -509,21 +509,25 @@ prepareenv() { rm -f $BASEDIR/build/usr/src/lsalr 2>/dev/null # Prepare string for /etc/system-release. - SYSTEM_RELEASE="${NAME} ${VERSION} (${BUILD_ARCH})" - if [ "$(git status -s | wc -l)" == "0" ]; then - GIT_STATUS="" - else - GIT_STATUS="-dirty" - fi - case "$GIT_BRANCH" in - core*|beta?|rc?) - SYSTEM_RELEASE="${SYSTEM_RELEASE} - $GIT_BRANCH$GIT_STATUS" - ;; - *) - SYSTEM_RELEASE="${SYSTEM_RELEASE} - Development Build: $GIT_BRANCH/${GIT_LASTCOMMIT:0:8}$GIT_STATUS" - ;; + local system_release="${NAME} ${VERSION} (${BUILD_ARCH})" + + case "${GIT_BRANCH}" in + core*|beta?|rc?) + system_release="${system_release} - ${GIT_BRANCH}" + ;; + *) + system_release="${system_release} - Development Build: ${GIT_BRANCH}/${GIT_LASTCOMMIT:0:8}" + ;; esac + # Append -dirty tag for local changes + if [ "$(git status -s | wc -l)" != "0" ]; then + system_release="${system_release}-dirty" + fi + + # Export variable + SYSTEM_RELEASE="${system_release}" + # Setup ccache cache size enterchroot ccache --max-size="${CCACHE_CACHE_SIZE}" >/dev/null }