mirror of
https://github.com/netdata/netdata.git
synced 2025-04-08 15:20:11 +00:00

* Centralize cache path handling. * Add better debugging support for static build infrastructure. * Centralize handling of git repository fetching for static builds. * Centralize build directory handling in the static build. And quit using a sub-directory of packaging/makeself from the source tree for it. * Remove version numbers from static build jobs. * Better organize static build jobs. 0x numbers for non-build prep-work 1x numbers for libraries that potentially impact multiple other things we vendor. 2x numbers for libraries that are direct dependencies of Netdata 3x numbers for combined libraries and tooling used by Netdata 4x numbers for general tooling used by Netdata 5x numbers for tooling used by single specific components 6x numbers for non-build prep-work for the Netdata build 7x numbers for the actual build of Netdata 8x numbers for post-build checks 9x numbers for the actual packaging * Clean up variable handling in Netdata build job. * Split post-build handling steps to their own jobs. This will make it easier to see what is actually going on in the build process. * Clean up CI messages. * Split archive creation sub-steps into indivudal jobs. * Disable shell tracing for archive creation job. It’s not needed in 99.9% of cases, and should only be enabled locally if it is needed. * Assorted fixes for code restructuring. * Tidy up paths for runtime check. * Fix CI handling of artifacts.
35 lines
1.7 KiB
Bash
Executable file
35 lines
1.7 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
# shellcheck source=packaging/makeself/functions.sh
|
|
. "$(dirname "${0}")/../functions.sh" "${@}" || exit 1
|
|
|
|
# shellcheck disable=SC2015
|
|
[ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Copying archive files" || true
|
|
|
|
VERSION="$("${NETDATA_INSTALL_PARENT}/netdata/bin/netdata" -v | cut -f 2 -d ' ')"
|
|
[ -z "${VERSION}" ] && VERSION="$(cat "${NETDATA_SOURCE_PATH}/packaging/version")"
|
|
|
|
if [ "${VERSION}" == "" ]; then
|
|
echo >&2 "Cannot find version number. Create makeself executable from source code with git tree structure."
|
|
exit 1
|
|
fi
|
|
|
|
FILE="netdata-${BUILDARCH}-${VERSION}.gz.run"
|
|
|
|
run mv "${NETDATA_INSTALL_PATH}.gz.run" "${NETDATA_SOURCE_PATH}/artifacts/${FILE}"
|
|
|
|
[ -f "${NETDATA_SOURCE_PATH}/artifacts/netdata-${BUILDARCH}-latest.gz.run" ] && rm "${NETDATA_SOURCE_PATH}/artifacts/netdata-${BUILDARCH}-latest.gz.run"
|
|
run cp "${NETDATA_SOURCE_PATH}/artifacts/${FILE}" "${NETDATA_SOURCE_PATH}/artifacts/netdata-${BUILDARCH}-latest.gz.run"
|
|
|
|
if [ "${BUILDARCH}" = "x86_64" ]; then
|
|
[ -f "${NETDATA_SOURCE_PATH}/artifacts/netdata-latest.gz.run" ] && rm "${NETDATA_SOURCE_PATH}/artifacts/netdata-latest.gz.run"
|
|
run cp "${NETDATA_SOURCE_PATH}/artifacts/${FILE}" "${NETDATA_SOURCE_PATH}/artifacts/netdata-latest.gz.run"
|
|
[ -f "${NETDATA_SOURCE_PATH}/artifacts/netdata-${VERSION}.gz.run" ] && rm "${NETDATA_SOURCE_PATH}/artifacts/netdata-${VERSION}.gz.run"
|
|
run cp "${NETDATA_SOURCE_PATH}/artifacts/${FILE}" "${NETDATA_SOURCE_PATH}/artifacts/netdata-${VERSION}.gz.run"
|
|
fi
|
|
|
|
chown -R "$(stat -c '%u:%g' "${NETDATA_SOURCE_PATH}")" "${NETDATA_SOURCE_PATH}/artifacts"
|
|
|
|
# shellcheck disable=SC2015
|
|
[ "${GITHUB_ACTIONS}" = "true" ] && echo "::endgroup::" || true
|