updated build system

This commit is contained in:
2024-07-25 09:26:32 -05:00
parent 468668e518
commit 356521e176
4 changed files with 33 additions and 22 deletions

View File

@ -36,18 +36,15 @@ if [ ! -d "${DEST_DIR}" ]; then
error_exit "dest directory not found: ${DEST_DIR}" 1
fi
FILE_PART=${PROJECT_NAME}_${PROJECT_MAJOR_VERSION}.${PROJECT_MINOR_VERSION}.${PROJECT_REVISION_VERSION}-${PROJECT_RELEASE_ITER}-${PROJECT_GIT_REV}_${PROJECT_BUILD_ARCH}_${PROJECT_OS}
OUT_FILE=${FILE_PART}.tar.gz
pushd "${DEST_DIR}"
if [ -f "${OUT_FILE}" ]; then
rm -f "${OUT_FILE}" || error_exit "failed to delete file: ${OUT_FILE}" 1
if [ -f "${PROJECT_OUT_FILE}" ]; then
rm -f "${PROJECT_OUT_FILE}" || error_exit "failed to delete file: ${PROJECT_OUT_FILE}" 1
fi
if [ -f "${OUT_FILE}.sha256" ]; then
rm -f "${OUT_FILE}.sha256" || error_exit "failed to delete file: ${OUT_FILE}.sha256" 1
if [ -f "${PROJECT_OUT_FILE}.sha256" ]; then
rm -f "${PROJECT_OUT_FILE}.sha256" || error_exit "failed to delete file: ${PROJECT_OUT_FILE}.sha256" 1
fi
if [ -f "${OUT_FILE}.sig" ]; then
rm -f "${OUT_FILE}.sig" || error_exit "failed to delete file: ${OUT_FILE}.sig" 1
if [ -f "${PROJECT_OUT_FILE}.sig" ]; then
rm -f "${PROJECT_OUT_FILE}.sig" || error_exit "failed to delete file: ${PROJECT_OUT_FILE}.sig" 1
fi
popd
@ -65,8 +62,8 @@ set +f
popd
pushd "${DEST_DIR}"
tar cvzf "${OUT_FILE}" -C ${TEMP_DIR} . || error_exit "failed to create archive: ${OUT_FILE}" 1
create_file_validations "${OUT_FILE}"
tar cvzf "${PROJECT_OUT_FILE}" -C ${TEMP_DIR} . || error_exit "failed to create archive: ${PROJECT_OUT_FILE}" 1
create_file_validations "${PROJECT_OUT_FILE}"
popd
error_exit "created package ${FILE_PART}" 0
error_exit "created package ${PROJECT_FILE_PART}" 0