mirror of
https://github.com/netdata/netdata.git
synced 2025-04-10 16:17:36 +00:00

* Move to using CPack for repository configuration packages. This simplifies testing of changes to the configuration itself, as well as making package builds marginally faster. * Fix CMake handling for old RPM distros. * Fix openSUSE detection. * Fix file installation. * Override code ownership for packaging/repoconfig/CMakeLists.txt This way changes won’t bother people who aren’t actually responsible for it. * Update CI skip logic to work correctly with new repoconfig setup. * Add improved status messages.
44 lines
797 B
Bash
Executable file
44 lines
797 B
Bash
Executable file
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
user="netdatabot"
|
|
|
|
host="${1}"
|
|
distro="${2}"
|
|
arch="${3}"
|
|
format="${4}"
|
|
repo="${5}"
|
|
pkg_src="${6:-./artifacts}"
|
|
|
|
staging="${TMPDIR:-/tmp}/package-staging"
|
|
prefix="/home/netdatabot/incoming/${repo}/"
|
|
|
|
packages="$(find "${pkg_src}" -name "*.${format}")"
|
|
|
|
mkdir -p "${staging}"
|
|
|
|
case "${format}" in
|
|
deb)
|
|
src="${staging}/${distro}"
|
|
mkdir -p "${src}"
|
|
|
|
for pkg in ${packages}; do
|
|
cp "${pkg}" "${src}"
|
|
done
|
|
;;
|
|
rpm)
|
|
src="${staging}/${distro}/${arch}/"
|
|
mkdir -p "${src}"
|
|
|
|
for pkg in ${packages}; do
|
|
cp "${pkg}" "${src}"
|
|
done
|
|
;;
|
|
*)
|
|
echo "Unrecognized package format ${format}."
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
rsync -vrptO "${staging}/" "${user}@${host}:${prefix}"
|