From ecf6f88e137c1e8d1be90b237e85d23a81a7af0b Mon Sep 17 00:00:00 2001 From: Runar Borge Date: Wed, 16 Jan 2019 23:19:30 +0100 Subject: Added sisplay of the current commit id on all packages --- scripts/build-submodules | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/scripts/build-submodules b/scripts/build-submodules index 9bbc7ed5..960b37ea 100755 --- a/scripts/build-submodules +++ b/scripts/build-submodules @@ -91,10 +91,11 @@ package_in_buildlist() { build_package() { PKG=$1 + COMMITID=$(git log --pretty=format:'%h' -n 1--git-dir $PKGDIR/$PKG) if ! package_in_buildlist $1; then return 0 fi - status_start "Building package: $PKG" + status_start "Building package: $PKG Commit id: $COMMITID" if [ ! -d "$PKGDIR/$PKG/debian" ]; then status_skip "No source for: $PKG" return 1 @@ -115,9 +116,10 @@ echo "Cleaning up buildfiles..." rm -rf $PKGDIR/*.deb rm -rf $PKGDIR/*.changes rm -rf $PKGDIR/*.buildlog +COMMITID=$(git log --pretty=format:'%h' -n 1--git-dir $PKGDIR) echo "-----------------------------------------------------" echo "Starting build process for all packages" -echo "" +echo "vyos-build Commit ID: $COMMITID" initialize_packages() { status_start "Initializing packages" @@ -145,7 +147,6 @@ build_frr() { if ! package_in_buildlist "frr"; then return 0 fi - status_start "Building package: $PKG (Git commit/tag: $FRR_VER)" if [ ! -f "$PKGDIR/$PKG/README.md" ]; then status_skip "No source for: $PKG" @@ -251,10 +252,12 @@ done # KERNEL build_kernel() { + PKG="vyos-kernel" if ! package_in_buildlist "vyos-kernel"; then return 0 fi - status_start "Building-package: vyos-kernel" + COMMITID=$(git log --pretty=format:'%h' -n 1--git-dir $PKGDIR/$PKG) + status_start "Building-package: vyos-kernel Commit ID:$COMMITID" if [ ! -f "$PKGDIR/vyos-kernel/Makefile" ]; then status_skip "No source for: vyos-kernel" return 0 @@ -289,10 +292,12 @@ fi # WIREGUARD build_wireguard() { + PKG="vyos-wireguard" if ! package_in_buildlist "vyos-wireguard"; then return 0 fi - status_start "Building package: vyos-wireguard" + COMMITID=$(git log --pretty=format:'%h' -n 1--git-dir $PKGDIR/$PKG) + status_start "Building package: vyos-wireguard Commit ID:$COMMITID" if [ ! -d "$PKGDIR/vyos-wireguard/debian" ]; then status_skip "No source for: vyos-wireguard" @@ -339,10 +344,12 @@ fi # ACCEL-PPP build_accel-ppp() { + PKG="vyos-accel-ppp" if ! package_in_buildlist "accel-ppp"; then return 0 fi - status_start "Building package: vyos-accel-ppp" + COMMITID=$(git log --pretty=format:'%h' -n 1--git-dir $PKGDIR/$PKG) + status_start "Building package: vyos-accel-ppp Commit ID: $COMMITID" if [ ! -d "$PKGDIR/vyos-accel-ppp/debian" ]; then status_skip "No source for: vyos-accel-ppp" return 0 -- cgit v1.2.3 From 872097c8339da9e5f17066ac2a7abfc3524589c7 Mon Sep 17 00:00:00 2001 From: Runar Borge Date: Wed, 16 Jan 2019 23:30:59 +0100 Subject: Fixed print error when using SKIP message, all text was not overwritten --- scripts/build-submodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-submodules b/scripts/build-submodules index 960b37ea..51b18c24 100755 --- a/scripts/build-submodules +++ b/scripts/build-submodules @@ -64,7 +64,7 @@ status_fail() { } status_skip() { - echo -ne "\r[SKIP] $1\n" + echo -ne "\r[SKIP] $1\033[K\n" } error_msg() { -- cgit v1.2.3