@cryptotaxi247 / netdata-1 / commits / 78b14e7c4

remove unused github scripts (#16661)

* remove build-artifacts.sh * remove build-dist.sh * remove run_install_with_dist_file.sh

Ilya Mashchenko committed Dec 27, 2023 at 17:15 UTC 78b14e7c450d7570aa8046760cfea81aa80fd547
3 files changed -192
.github/scripts/build-artifacts.sh deleted
-82
@@ -1,82 +0,0 @@
1 -#!/bin/sh
2 -#
3 -# Builds the netdata-vX.y.Z-xxxx.tar.gz source tarball (dist)
4 -# and netdata-vX.Y.Z-xxxx.gz.run (static x86_64) artifacts.
5 -
6 -set -e
7 -
8 -# shellcheck source=.github/scripts/functions.sh
9 -. "$(dirname "$0")/functions.sh"
10 -
11 -NAME="${NAME:-netdata}"
12 -VERSION="${VERSION:-"$(git describe)"}"
13 -BASENAME="$NAME-$VERSION"
14 -
15 -prepare_build() {
16 - progress "Preparing build"
17 - (
18 - test -d artifacts || mkdir -p artifacts
19 - echo "${VERSION}" > packaging/version
20 - ) >&2
21 -}
22 -
23 -build_dist() {
24 - progress "Building dist"
25 - (
26 - command -v git > /dev/null && [ -d .git ] && git clean -d -f
27 - autoreconf -ivf
28 - ./configure \
29 - --prefix=/usr \
30 - --sysconfdir=/etc \
31 - --localstatedir=/var \
32 - --libexecdir=/usr/libexec \
33 - --with-zlib \
34 - --with-math \
35 - --with-user=netdata \
36 - --disable-dependency-tracking \
37 - CFLAGS=-O2
38 - make dist
39 - mv "${BASENAME}.tar.gz" artifacts/
40 - ) >&2
41 -}
42 -
43 -build_static_x86_64() {
44 - progress "Building static x86_64"
45 - (
46 - command -v git > /dev/null && [ -d .git ] && git clean -d -f
47 - USER="" ./packaging/makeself/build-x86_64-static.sh
48 - ) >&2
49 -}
50 -
51 -prepare_assets() {
52 - progress "Preparing assets"
53 - (
54 - cp packaging/version artifacts/latest-version.txt
55 -
56 - cd artifacts || exit 1
57 - ln -f "${BASENAME}.tar.gz" netdata-latest.tar.gz
58 - ln -f "${BASENAME}.gz.run" netdata-latest.gz.run
59 - sha256sum -b ./* > "sha256sums.txt"
60 - ) >&2
61 -}
62 -
63 -steps="prepare_build build_dist build_static_x86_64"
64 -steps="$steps prepare_assets"
65 -
66 -_main() {
67 - for step in $steps; do
68 - if ! run "$step"; then
69 - if [ -t 1 ]; then
70 - debug
71 - else
72 - fail "Build failed"
73 - fi
74 - fi
75 - done
76 -
77 - echo "🎉 All Done!"
78 -}
79 -
80 -if [ -n "$0" ] && [ x"$0" != x"-bash" ]; then
81 - _main "$@"
82 -fi
.github/scripts/build-dist.sh deleted
-71
@@ -1,71 +0,0 @@
1 -#!/bin/sh
2 -#
3 -# Builds the netdata-vX.y.Z-xxxx.tar.gz source tarball (dist)
4 -
5 -set -e
6 -
7 -# shellcheck source=.github/scripts/functions.sh
8 -. "$(dirname "$0")/functions.sh"
9 -
10 -NAME="${NAME:-netdata}"
11 -VERSION="${VERSION:-"$(git describe --always)"}"
12 -BASENAME="$NAME-$VERSION"
13 -
14 -prepare_build() {
15 - progress "Preparing build"
16 - (
17 - test -d artifacts || mkdir -p artifacts
18 - echo "${VERSION}" > packaging/version
19 - ) >&2
20 -}
21 -
22 -build_dist() {
23 - progress "Building dist"
24 - (
25 - command -v git > /dev/null && [ -d .git ] && git clean -d -f
26 - autoreconf -ivf
27 - ./configure \
28 - --prefix=/usr \
29 - --sysconfdir=/etc \
30 - --localstatedir=/var \
31 - --libexecdir=/usr/libexec \
32 - --with-zlib \
33 - --with-math \
34 - --with-user=netdata \
35 - --disable-dependency-tracking \
36 - CFLAGS=-O2
37 - make dist
38 - mv "${BASENAME}.tar.gz" artifacts/
39 - ) >&2
40 -}
41 -
42 -prepare_assets() {
43 - progress "Preparing assets"
44 - (
45 - cp packaging/version artifacts/latest-version.txt
46 - cd artifacts || exit 1
47 - ln -f "${BASENAME}.tar.gz" netdata-latest.tar.gz
48 - ln -f "${BASENAME}.gz.run" netdata-latest.gz.run
49 - sha256sum -b ./* > "sha256sums.txt"
50 - ) >&2
51 -}
52 -
53 -steps="prepare_build build_dist prepare_assets"
54 -
55 -_main() {
56 - for step in $steps; do
57 - if ! run "$step"; then
58 - if [ -t 1 ]; then
59 - debug
60 - else
61 - fail "Build failed"
62 - fi
63 - fi
64 - done
65 -
66 - echo "🎉 All Done!"
67 -}
68 -
69 -if [ -n "$0" ] && [ x"$0" != x"-bash" ]; then
70 - _main "$@"
71 -fi
.github/scripts/run_install_with_dist_file.sh deleted
-39
@@ -1,39 +0,0 @@
1 -#!/usr/bin/env bash
2 -#
3 -# This script is evaluating netdata installation with the source from make dist
4 -#
5 -# Copyright: SPDX-License-Identifier: GPL-3.0-or-later
6 -#
7 -# Author : Pavlos Emm. Katsoulakis <paul@netdata.cloud)
8 -
9 -set -e
10 -
11 -if [ $# -ne 1 ]; then
12 - printf >&2 "Usage: %s <dist_file>\n" "$(basename "$0")"
13 - exit 1
14 -fi
15 -
16 -distfile="${1}"
17 -shift
18 -
19 -printf >&2 "Opening dist archive %s ... " "${distfile}"
20 -tar -xovf "${distfile}"
21 -distdir="$(echo "${distfile}" | rev | cut -d. -f3- | rev)"
22 -cp -a packaging/installer/install-required-packages.sh "${distdir}/install-required-packages.sh"
23 -if [ ! -d "${distdir}" ]; then
24 - printf >&2 "ERROR: %s is not a directory" "${distdir}"
25 - exit 2
26 -fi
27 -
28 -printf >&2 "Entering %s and starting docker run ..." "${distdir}"
29 -
30 -pushd "${distdir}" || exit 1
31 -docker run \
32 - -e DISABLE_TELEMETRY=1 \
33 - -v "${PWD}:/netdata" \
34 - -w /netdata \
35 - "ubuntu:latest" \
36 - /bin/bash -c "./install-required-packages.sh --dont-wait --non-interactive netdata && apt install wget && ./netdata-installer.sh --dont-wait --require-cloud --disable-telemetry --install-prefix /tmp --one-time-build && echo \"Validating netdata instance is running\" && wget -O - 'http://127.0.0.1:19999/api/v1/info' | grep version"
37 -popd || exit 1
38 -
39 -echo "All Done!"