copy version file as well
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
Robin Müller 2022-05-06 15:53:16 +02:00
parent 2f182a5e21
commit e4bbdbc532
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814

View File

@ -8,6 +8,7 @@ obsw_root=""
q7s_yocto_dir="q7s-yocto"
q7s_package_path="q7s-package/${q7s_yocto_dir}"
obsw_version_filename="obsw_version.txt"
yocto_obsw_path="yocto/meta-eive/recipes-core/eive-obsw/files"
yocto_watchdog_path="yocto/meta-eive/recipes-support/eive-obsw-watchdog/files"
obsw_bin_name="eive-obsw-stripped"
@ -25,7 +26,7 @@ elif [ -d ../${build_dir} ]; then
cd ..
obsw_root=$(pwd)
else
echo "No way into the EIVE OBSW Root folder found. Exiting"
echo "-E- No way into the EIVE OBSW Root folder found. Exiting"
exit 1
fi
@ -38,32 +39,49 @@ elif [ -d ../${q7s_yocto_dir} ]; then
yocto_root=$(pwd)
fi
if [ -z ${yocto_root} ]; then
echo "No yocto directory found. Exiting"
echo "-E- No yocto directory found. Exiting"
exit 1
fi
cd ${obsw_root}
version_cmd="git describe --tags --always --exclude docker_*"
echo "-I- Running ${version_cmd} to retrieve OBSW version and store it into ${obsw_version_filename}"
version_tag=$(${version_cmd})
echo "-I- Detected version tag ${version_tag}"
echo ${version_tag} > ${obsw_version_filename}
if [ ! -d ${build_dir} ]; then
echo "No Q7S Release binary folder ${build_dir} found. Exiting"
exit 1
fi
if [ ! -f ${build_dir}/${obsw_bin_name} ]; then
echo "No EIVE OBSW binary found to intall to yocto"
echo "-W- No EIVE OBSW binary found to intall to yocto"
else
cp_cmd="cp $(pwd)/${build_dir}/${obsw_bin_name} ${yocto_root}/${yocto_obsw_path}/${obsw_target_name}"
echo "Executing: ${cp_cmd}"
echo "-I- Executing: ${cp_cmd}"
eval ${cp_cmd}
echo "Installed EIVE OBSW into yocto repository successfully"
cp_ver_cmd="cp $(pwd)/${obsw_version_filename} ${yocto_root}/${yocto_obsw_path}/${obsw_target_name}"
echo "-I- Executing: ${cp_ver_cmd}"
eval ${cp_ver_cmd}
echo "-I- Installed EIVE OBSW into yocto repository successfully"
fi
if [ ! -f ${build_dir}/${watchdog_bin_name} ]; then
echo "No EIVE Watchdog found to intall to yocto"
echo "-W- No EIVE Watchdog found to intall to yocto"
else
cp_cmd="cp $(pwd)/${build_dir}/${watchdog_bin_name} ${yocto_root}/${yocto_watchdog_path}/${watchdog_target_name}"
echo "Executing: ${cp_cmd}"
echo "-I- Executing: ${cp_cmd}"
eval ${cp_cmd}
echo "Installed EIVE watchdog into yocto repository successfully"
cp_ver_cmd="cp $(pwd)/${obsw_version_filename} ${yocto_root}/${yocto_watchdog_path}/${watchdog_target_name}"
echo "-I- Executing: ${cp_ver_cmd}"
eval ${cp_ver_cmd}
echo "-I- Installed EIVE watchdog into yocto repository successfully"
fi
if [ -f $(pwd)/${obsw_version_filename} ]; then
rm $(pwd)/${obsw_version_filename}
fi
cd ${init_dir}