Skip to content

Commit c92118d

Browse files
committed
fix deb package formact for github assets
1 parent 3b1cf5c commit c92118d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

scripts/packages/package-check.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,14 +186,17 @@ check_repo() {
186186
prep_deb() {
187187
echo "Preparing deb packages..."
188188
mkdir -p "${PKG_DIR}/azure/deb"
189-
for i in $(find "${PKG_DIR}" | grep -e "nginx-agent[_-]${VERSION}.*\.deb"); do
189+
for i in $(find "${PKG_DIR}" | grep -e "nginx-agent[_-]${VERSION}.*\.deb" | grep -v "azure"); do
190190
az_dest="${PKG_DIR}/azure/deb/$(basename "$i")"
191191
# Azure path
192+
# Should be 'nginx-agent_3.5.0~bullseye_arm64.deb'
192193
echo "Copying ${i} to ${az_dest}"
193194
cp "${i}" "${az_dest}"
194195
# GitHub release asset path
195-
echo "Moving ${i} to ${i/_/-}"
196-
mv "${i}" "${i/_/-}"
196+
# Should be 'nginx-agent-3.5.0.bullseye_arm64.deb'
197+
gh_dest=$(echo ${i} | sed -E "s/_/-/" | sed -E "s/~/./")
198+
echo "Moving ${i} to ${gh_dest}"
199+
mv "${i}" "${gh_dest}"
197200
done
198201
}
199202

@@ -279,7 +282,7 @@ check_repo
279282
check_pkgs
280283

281284
# Prepare packages for upload
282-
if [[ $DL == 1 ]]; then
285+
if [[ ${DL} == 1 ]]; then
283286
prepare_packages
284287
create_tarball
285288
fi

0 commit comments

Comments
 (0)