Skip to content
Snippets Groups Projects
Commit 4b40750a authored by Denis Pynkin's avatar Denis Pynkin
Browse files

Add cleanup of unneeded binaries


Cleanup repository prior to extract the binaries -- this allows to
remove unneeded binaries listed in previous versions but not needed in
current version.
Shipping of stalled binaries, for example outdated libraries, may have
unpredictable affect to executables and tests.

Signed-off-by: default avatarDenis Pynkin <denis.pynkin@collabora.com>
parent 933eba4a
No related branches found
No related tags found
1 merge request!11Add cleanup of unneeded binaries
......@@ -131,7 +131,7 @@ update_test_repository () {
local DIR="bin"
[ -n "$PREFIX" ] && DIR=$PREFIX
local TARGET="${ARCH}/${DIR}"
mkdir -p ${TEST}/${TARGET}
mkdir -p "${TEST}/${TARGET}"
if [ -n "$FILENAME" ]; then
TARGET="${TARGET}/${FILENAME}"
......@@ -148,6 +148,15 @@ update_test_repository () {
done < "${TEST}/external-binaries.cfg"
}
# cleanup the target directory to not include the stalled binaries
cleanup_test_repository () {
local ARCH=$1
[ -z "${ARCH}" ] && exit 1
pwd
ls -la .
[ -d "${TEST}/${ARCH}" ] && rm -rf "${TEST}/${ARCH}"
}
commit_all () {
local GIT="git -C ${TEST}"
local CHANGES=$(${GIT} diff-index --name-only HEAD --)
......@@ -155,7 +164,7 @@ commit_all () {
if [ -n "${CHANGES}" ]; then
${GIT} config --local "user.email" "jenkins@apertis.org"
${GIT} config --local "user.name" "Apertis jenkins"
${GIT} commit -s -F ../${TEST}-commit-msg.txt
${GIT} commit -s -F ../${TEST}-commit-msg.txt -- ${ARCHS}
if [ -z "$dry_run" ]; then
${GIT} push origin HEAD:${BRANCH}
fi
......@@ -178,6 +187,8 @@ for ARCH in ${ARCHS} ; do
download_extract_packages
cleanup_test_repository ${ARCH}
update_test_repository
done
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment