From 83ba6762cc43d9db581b979bb5e3445669e46cc2 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 25 Nov 2024 18:33:56 +0100 Subject: Merging upstream version 2.0.3+dfsg (Closes: #923993, #1042533, #1045145). Signed-off-by: Daniel Baumann --- packaging/windows/package-windows.sh | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) (limited to 'packaging/windows/package-windows.sh') diff --git a/packaging/windows/package-windows.sh b/packaging/windows/package-windows.sh index 03f72a692..997bb7d4f 100755 --- a/packaging/windows/package-windows.sh +++ b/packaging/windows/package-windows.sh @@ -2,21 +2,20 @@ repo_root="$(dirname "$(dirname "$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null && pwd -P)")")" -if [ -n "${BUILD_DIR}" ]; then - build="${BUILD_DIR}" -elif [ -n "${OSTYPE}" ]; then - if [ -n "${MSYSTEM}" ]; then - build="${repo_root}/build-${OSTYPE}-${MSYSTEM}" - else - build="${repo_root}/build-${OSTYPE}" - fi -elif [ "$USER" = "vk" ]; then - build="${repo_root}/build" -else - build="${repo_root}/build" +# shellcheck source=./win-build-dir.sh +. "${repo_root}/packaging/windows/win-build-dir.sh" + +set -eu -o pipefail + +# Regenerate keys everytime there is an update +if [ -d /opt/netdata/etc/pki/ ]; then + rm -rf /opt/netdata/etc/pki/ fi -set -exu -o pipefail +# Remove previous installation of msys2 script +if [ -f /opt/netdata/usr/bin/bashbug ]; then + rm -rf /opt/netdata/usr/bin/bashbug +fi ${GITHUB_ACTIONS+echo "::group::Installing"} cmake --install "${build}" @@ -34,18 +33,12 @@ if [ ! -f "/gpl-3.0.txt" ]; then fi if [ ! -f "/cloud.txt" ]; then - curl -o /cloud.txt "https://raw.githubusercontent.com/netdata/netdata/master/src/web/gui/v2/LICENSE.md" + curl -o /cloud.txt "https://app.netdata.cloud/LICENSE.txt" fi ${GITHUB_ACTIONS+echo "::endgroup::"} -${GITHUB_ACTIONS+echo "::group::Packaging"} +${GITHUB_ACTIONS+echo "::group::Copy Files"} tar -xf /msys2-latest.tar.zst -C /opt/netdata/ || exit 1 cp -R /opt/netdata/msys64/* /opt/netdata/ || exit 1 rm -rf /opt/netdata/msys64/ -NDVERSION=$"$(grep 'CMAKE_PROJECT_VERSION:STATIC' "${build}/CMakeCache.txt"| cut -d= -f2)" -NDMAJORVERSION=$"$(grep 'CMAKE_PROJECT_VERSION_MAJOR:STATIC' "${build}/CMakeCache.txt"| cut -d= -f2)" -NDMINORVERSION=$"$(grep 'CMAKE_PROJECT_VERSION_MINOR:STATIC' "${build}/CMakeCache.txt"| cut -d= -f2)" - -/mingw64/bin/makensis.exe -DCURRVERSION="${NDVERSION}" -DMAJORVERSION="${NDMAJORVERSION}" -DMINORVERSION="${NDMINORVERSION}" "${repo_root}/packaging/windows/installer.nsi" ${GITHUB_ACTIONS+echo "::endgroup::"} - -- cgit v1.2.3