diff options
author | Runar Borge <runar@borge.nu> | 2019-01-17 10:08:21 +0100 |
---|---|---|
committer | Runar Borge <runar@borge.nu> | 2019-01-17 10:08:21 +0100 |
commit | be0c850e75be125f99f31a1229b3cc0212c00db6 (patch) | |
tree | 12e6dde6db0b51722753bd28ad58b39dd756596c | |
parent | d8bbd8988dff2e0be0453ed1df67e1b1980d07a6 (diff) | |
download | vyos-build-be0c850e75be125f99f31a1229b3cc0212c00db6.tar.gz vyos-build-be0c850e75be125f99f31a1229b3cc0212c00db6.zip |
Changed command to get commit id
-rwxr-xr-x | scripts/build-submodules | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/build-submodules b/scripts/build-submodules index 51b18c24..50814b00 100755 --- a/scripts/build-submodules +++ b/scripts/build-submodules @@ -91,7 +91,7 @@ package_in_buildlist() { build_package() { PKG=$1 - COMMITID=$(git log --pretty=format:'%h' -n 1--git-dir $PKGDIR/$PKG) + COMMITID=$(cd $PKGDIR/$PKG; git rev-parse --short=10 HEAD) if ! package_in_buildlist $1; then return 0 fi @@ -116,7 +116,7 @@ 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) +COMMITID=$(cd $PKGDIR; git rev-parse --short=10 HEAD) echo "-----------------------------------------------------" echo "Starting build process for all packages" echo "vyos-build Commit ID: $COMMITID" @@ -256,7 +256,7 @@ build_kernel() { if ! package_in_buildlist "vyos-kernel"; then return 0 fi - COMMITID=$(git log --pretty=format:'%h' -n 1--git-dir $PKGDIR/$PKG) + COMMITID=$(cd $PKGDIR/$PKG; git rev-parse --short=10 HEAD) status_start "Building-package: vyos-kernel Commit ID:$COMMITID" if [ ! -f "$PKGDIR/vyos-kernel/Makefile" ]; then status_skip "No source for: vyos-kernel" @@ -296,7 +296,7 @@ build_wireguard() { if ! package_in_buildlist "vyos-wireguard"; then return 0 fi - COMMITID=$(git log --pretty=format:'%h' -n 1--git-dir $PKGDIR/$PKG) + COMMITID=$(cd $PKGDIR/$PKG; git rev-parse --short=10 HEAD) status_start "Building package: vyos-wireguard Commit ID:$COMMITID" if [ ! -d "$PKGDIR/vyos-wireguard/debian" ]; then @@ -348,7 +348,7 @@ build_accel-ppp() { if ! package_in_buildlist "accel-ppp"; then return 0 fi - COMMITID=$(git log --pretty=format:'%h' -n 1--git-dir $PKGDIR/$PKG) + COMMITID=$(cd $PKGDIR/$PKG; git rev-parse --short=10 HEAD) 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" |