]> git.corax.cc Git - foundry/commitdiff
distbot: Don't attempt to publish non-deb files
authorMatthias Kruk <m@m10k.eu>
Wed, 1 Dec 2021 09:35:20 +0000 (18:35 +0900)
committerMatthias Kruk <m@m10k.eu>
Wed, 1 Dec 2021 09:35:20 +0000 (18:35 +0900)
When publishing files, distbot attempts to publish all files from a
context, including non-deb files such as logs.
This commit modifies distbot so that it attempts to publish only
debian packages.

distbot.sh

index ff54c795b8bcca4793d9d687ec9c0f4bf7145bb5..1e733f721c75b19fdef80adc4578bec33025e530 100755 (executable)
@@ -166,12 +166,19 @@ process_sign_message() {
                return 1
        fi
 
-       readarray -t artifacts < <(foundry_context_get_files "$context")
+       readarray -t artifacts < <(foundry_context_get_files "$context" "signed")
 
        for artifact in "${artifacts[@]}"; do
                local artifact_name
+               local extension
 
                artifact_name="${artifact##*/}"
+               extension="${artifact_name##*.}"
+
+               if [[ "$extension" != "deb" ]]; then
+                       log_debug "Skipping non-deb artifact $artifact_name"
+                       continue
+               fi
 
                if process_new_package "$context" "$artifact" "$repo" "$codename"; then
                        distributed+=("$artifact_name")