diff --git a/scripts/release-firefox-xpi.sh b/scripts/release-firefox-xpi.sh index 3b4327a..7dff942 100755 --- a/scripts/release-firefox-xpi.sh +++ b/scripts/release-firefox-xpi.sh @@ -44,9 +44,9 @@ if [[ -z "$VERSION" || -z "$ADDON_ID" ]]; then exit 1 fi -SIGNED_XPI="$(find "$ARTIFACTS_DIR" -maxdepth 1 -type f -name '*.xpi' | sort | tail -n 1 || true)" +SIGNED_XPI="$(find "$ARTIFACTS_DIR" -maxdepth 1 -type f -name "*-${VERSION}.xpi" | sort | tail -n 1 || true)" if [[ -z "$SIGNED_XPI" ]]; then - echo "ERROR: no signed XPI found in $ARTIFACTS_DIR" >&2 + echo "ERROR: no signed XPI for version $VERSION found in $ARTIFACTS_DIR" >&2 exit 1 fi diff --git a/scripts/sign-firefox-xpi.sh b/scripts/sign-firefox-xpi.sh index 236dc3a..7126fd6 100755 --- a/scripts/sign-firefox-xpi.sh +++ b/scripts/sign-firefox-xpi.sh @@ -84,7 +84,7 @@ echo "Using AMO API proxy from WEB_EXT_API_PROXY" npx web-ext "${SIGN_ARGS[@]}" -SIGNED_XPI="$(find "$ARTIFACTS_DIR" -maxdepth 1 -type f -name '*.xpi' | sort | tail -n 1 || true)" +SIGNED_XPI="$(find "$ARTIFACTS_DIR" -maxdepth 1 -type f -name '*.xpi' -printf '%T@ %p\n' | sort -n | tail -n 1 | cut -d' ' -f2- || true)" if [[ -z "$SIGNED_XPI" ]]; then echo "ERROR: signed XPI was not created in $ARTIFACTS_DIR" >&2 exit 1