Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion tools/publish-release-artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,33 @@ set -x
# Zip up all the binaries to reduce the download size. DEBs and RPMs
# aren't included to be easier to work with.
find dist/ -type f \
-name 'alloy*' -not -name '*.deb' -not -name '*.rpm' -not -name 'alloy-installer-windows-*.exe' \
-name 'alloy*' -not -name '*.deb' -not -name '*.rpm' -not -name '*.zip' -not -name 'alloy-installer-windows-*.exe' \
Comment thread
thampiotr marked this conversation as resolved.
-exec zip -j -m "{}.zip" "{}" \;

# For the Windows installer only, we want to keep the original .exe file and create a zipped copy.
find dist/ -type f \
-name 'alloy-installer-windows-*.exe' \
-exec zip -j "{}.zip" "{}" \;

# Package rendered Alloy mixin dashboards as a release artifact.
MIXIN_DASHBOARDS_DIR='operations/alloy-mixin/rendered/dashboards'
MIXIN_DASHBOARDS_ARCHIVE="dist/alloy-mixin-dashboards-${RELEASE_TAG}.zip"

if [ ! -d "${MIXIN_DASHBOARDS_DIR}" ]; then
echo "Error: expected rendered dashboards in ${MIXIN_DASHBOARDS_DIR}"
exit 1
fi

shopt -s nullglob
dashboard_files=("${MIXIN_DASHBOARDS_DIR}"/*.json)
shopt -u nullglob
if [ ${#dashboard_files[@]} -eq 0 ]; then
echo "Error: no rendered dashboard JSON files found in ${MIXIN_DASHBOARDS_DIR}"
exit 1
fi

pushd operations/alloy-mixin/rendered && zip -r "../../../${MIXIN_DASHBOARDS_ARCHIVE}" dashboards && popd

Comment thread
thampiotr marked this conversation as resolved.
Outdated
# Generate SHA256 checksums for all release assets.
pushd dist && sha256sum -- * > SHA256SUMS && popd

Expand Down
Loading