From 69d88db5e5fc741049724c807e4f379c8cfedfd7 Mon Sep 17 00:00:00 2001 From: Robert Fratto Date: Tue, 26 Mar 2024 14:14:12 -0400 Subject: [PATCH] packaging: remove unnecessary nested alloy folder (#82) There is only one release asset, so we don't need nested folders in packaging/. --- packaging/{alloy => }/alloy.river | 0 packaging/{alloy => }/deb/alloy.service | 0 packaging/{alloy => }/deb/control/postinst | 0 packaging/{alloy => }/deb/control/prerm | 0 packaging/{alloy => }/environment-file | 0 packaging/{alloy => }/rpm/alloy.service | 0 packaging/{alloy => }/rpm/control/postinst | 0 packaging/{alloy => }/rpm/control/prerm | 0 packaging/{alloy => }/rpm/gpg-sign.sh | 0 packaging/{alloy => }/windows/config.river | 0 packaging/{alloy => }/windows/install_script.nsis | 0 packaging/{alloy => }/windows/logo.ico | Bin packaging/{alloy => }/windows/macros.nsis | 0 tools/make/packaging.mk | 12 ++++++------ tools/release | 2 +- 15 files changed, 7 insertions(+), 7 deletions(-) rename packaging/{alloy => }/alloy.river (100%) rename packaging/{alloy => }/deb/alloy.service (100%) rename packaging/{alloy => }/deb/control/postinst (100%) rename packaging/{alloy => }/deb/control/prerm (100%) rename packaging/{alloy => }/environment-file (100%) rename packaging/{alloy => }/rpm/alloy.service (100%) rename packaging/{alloy => }/rpm/control/postinst (100%) rename packaging/{alloy => }/rpm/control/prerm (100%) rename packaging/{alloy => }/rpm/gpg-sign.sh (100%) rename packaging/{alloy => }/windows/config.river (100%) rename packaging/{alloy => }/windows/install_script.nsis (100%) rename packaging/{alloy => }/windows/logo.ico (100%) rename packaging/{alloy => }/windows/macros.nsis (100%) diff --git a/packaging/alloy/alloy.river b/packaging/alloy.river similarity index 100% rename from packaging/alloy/alloy.river rename to packaging/alloy.river diff --git a/packaging/alloy/deb/alloy.service b/packaging/deb/alloy.service similarity index 100% rename from packaging/alloy/deb/alloy.service rename to packaging/deb/alloy.service diff --git a/packaging/alloy/deb/control/postinst b/packaging/deb/control/postinst similarity index 100% rename from packaging/alloy/deb/control/postinst rename to packaging/deb/control/postinst diff --git a/packaging/alloy/deb/control/prerm b/packaging/deb/control/prerm similarity index 100% rename from packaging/alloy/deb/control/prerm rename to packaging/deb/control/prerm diff --git a/packaging/alloy/environment-file b/packaging/environment-file similarity index 100% rename from packaging/alloy/environment-file rename to packaging/environment-file diff --git a/packaging/alloy/rpm/alloy.service b/packaging/rpm/alloy.service similarity index 100% rename from packaging/alloy/rpm/alloy.service rename to packaging/rpm/alloy.service diff --git a/packaging/alloy/rpm/control/postinst b/packaging/rpm/control/postinst similarity index 100% rename from packaging/alloy/rpm/control/postinst rename to packaging/rpm/control/postinst diff --git a/packaging/alloy/rpm/control/prerm b/packaging/rpm/control/prerm similarity index 100% rename from packaging/alloy/rpm/control/prerm rename to packaging/rpm/control/prerm diff --git a/packaging/alloy/rpm/gpg-sign.sh b/packaging/rpm/gpg-sign.sh similarity index 100% rename from packaging/alloy/rpm/gpg-sign.sh rename to packaging/rpm/gpg-sign.sh diff --git a/packaging/alloy/windows/config.river b/packaging/windows/config.river similarity index 100% rename from packaging/alloy/windows/config.river rename to packaging/windows/config.river diff --git a/packaging/alloy/windows/install_script.nsis b/packaging/windows/install_script.nsis similarity index 100% rename from packaging/alloy/windows/install_script.nsis rename to packaging/windows/install_script.nsis diff --git a/packaging/alloy/windows/logo.ico b/packaging/windows/logo.ico similarity index 100% rename from packaging/alloy/windows/logo.ico rename to packaging/windows/logo.ico diff --git a/packaging/alloy/windows/macros.nsis b/packaging/windows/macros.nsis similarity index 100% rename from packaging/alloy/windows/macros.nsis rename to packaging/windows/macros.nsis diff --git a/tools/make/packaging.mk b/tools/make/packaging.mk index ec259d4367..a51ce4a5e0 100644 --- a/tools/make/packaging.mk +++ b/tools/make/packaging.mk @@ -122,16 +122,16 @@ define generate_alloy_fpm = --url "https://github.com/grafana/alloy" \ --rpm-digest sha256 \ -t $(1) \ - --after-install packaging/alloy/$(1)/control/postinst \ - --before-remove packaging/alloy/$(1)/control/prerm \ + --after-install packaging/$(1)/control/postinst \ + --before-remove packaging/$(1)/control/prerm \ --config-files /etc/alloy.river \ --config-files $(ALLOY_ENVIRONMENT_FILE_$(1)) \ --rpm-rpmbuild-define "_build_id_links none" \ --package $(4) \ dist/alloy-linux-$(3)=/usr/bin/alloy \ - packaging/alloy/alloy.river=/etc/alloy.river \ - packaging/alloy/environment-file=$(ALLOY_ENVIRONMENT_FILE_$(1)) \ - packaging/alloy/$(1)/alloy.service=/usr/lib/systemd/system/alloy.service + packaging/alloy.river=/etc/alloy.river \ + packaging/environment-file=$(ALLOY_ENVIRONMENT_FILE_$(1)) \ + packaging/$(1)/alloy.service=/usr/lib/systemd/system/alloy.service endef ALLOY_PACKAGE_VERSION := $(patsubst v%,%,$(VERSION)) @@ -191,5 +191,5 @@ ifeq ($(USE_CONTAINER),1) else # quotes around mkdir are mandatory. ref: https://github.com/grafana/agent/pull/5664#discussion_r1378796371 "mkdir" -p dist - makensis -V4 -DVERSION=$(VERSION) -DOUT="../../../dist/alloy-installer.exe" ./packaging/alloy/windows/install_script.nsis + makensis -V4 -DVERSION=$(VERSION) -DOUT="../../../dist/alloy-installer.exe" ./alloy/windows/install_script.nsis endif diff --git a/tools/release b/tools/release index dbbf1738dc..e3733984d9 100755 --- a/tools/release +++ b/tools/release @@ -10,7 +10,7 @@ find dist/ -type f \ -exec zip -j -m "{}.zip" "{}" \; # Sign the RPM packages. DEB packages aren't signed. -./packaging/grafana-agent/rpm/gpg-sign.sh +./packaging/rpm/gpg-sign.sh # Get the SHA256SUMS before continuing. pushd dist && sha256sum -- * > SHA256SUMS && popd || exit