[build]: Fix build wrapper commands not cleanup issue (#7553)

cleanup the build commands after build finished.
This commit is contained in:
xumia 2021-05-07 16:52:18 +08:00 committed by GitHub
parent dee7d8f9ca
commit 9daec6f20b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -578,9 +578,8 @@ sudo rm -f $ONIE_INSTALLER_PAYLOAD $FILESYSTEM_SQUASHFS
## Note: -x to skip directories on different file systems, such as /proc
sudo du -hsx $FILESYSTEM_ROOT
sudo mkdir -p $FILESYSTEM_ROOT/var/lib/docker
sudo mksquashfs $FILESYSTEM_ROOT $FILESYSTEM_SQUASHFS -e boot -e var/lib/docker -e $PLATFORM_DIR
scripts/collect_host_image_version_files.sh $TARGET_PATH $FILESYSTEM_ROOT
sudo mksquashfs $FILESYSTEM_ROOT $FILESYSTEM_SQUASHFS -e boot -e var/lib/docker -e $PLATFORM_DIR
# Ensure admin gid is 1000
gid_user=$(sudo LANG=C chroot $FILESYSTEM_ROOT id -g $USERNAME) || gid_user="none"