fix: Firefox signing — manifest_version corruption + rate limiting
The sign script's sed command was replacing ALL "version" patterns including "manifest_version": 3, corrupting it to "manifest_version": 1. Fixed by anchoring the sed pattern to only match the top-level "version" field (starts with two spaces at line beginning). Also: - Added data_collection_permissions to Firefox manifest (new Mozilla requirement for all extensions) - Added 8-second sleep between retry attempts to avoid Mozilla API rate limiting (was causing cascading failures) https://claude.ai/code/session_01SWSwDfMVij53bCTNSCLMwn
This commit is contained in:
@@ -6,7 +6,12 @@
|
|||||||
"browser_specific_settings": {
|
"browser_specific_settings": {
|
||||||
"gecko": {
|
"gecko": {
|
||||||
"id": "silent-send@example.com",
|
"id": "silent-send@example.com",
|
||||||
"strict_min_version": "128.0"
|
"strict_min_version": "128.0",
|
||||||
|
"data_collection_permissions": {
|
||||||
|
"required": false,
|
||||||
|
"optional": false,
|
||||||
|
"description": "Silent Send does not collect, transmit, or store any data externally. All processing is 100% local in your browser."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"permissions": [
|
"permissions": [
|
||||||
|
|||||||
+10
-5
@@ -30,10 +30,10 @@ NEW_VERSION="$MAJOR.$MINOR.$PATCH"
|
|||||||
|
|
||||||
echo "Version: $CURRENT_VERSION → $NEW_VERSION"
|
echo "Version: $CURRENT_VERSION → $NEW_VERSION"
|
||||||
|
|
||||||
# Update all version references
|
# Update all version references (only top-level "version", not "manifest_version")
|
||||||
sed -i "s/\"version\": \"$CURRENT_VERSION\"/\"version\": \"$NEW_VERSION\"/" "$MANIFEST"
|
sed -i "s/^ \"version\": \"$CURRENT_VERSION\"/ \"version\": \"$NEW_VERSION\"/" "$MANIFEST"
|
||||||
sed -i "s/\"version\": \"$CURRENT_VERSION\"/\"version\": \"$NEW_VERSION\"/" "$MANIFEST_CHROME"
|
sed -i "s/^ \"version\": \"$CURRENT_VERSION\"/ \"version\": \"$NEW_VERSION\"/" "$MANIFEST_CHROME"
|
||||||
sed -i "s/\"version\": \"$CURRENT_VERSION\"/\"version\": \"$NEW_VERSION\"/" "$PACKAGE_JSON"
|
sed -i "s/^ \"version\": \"$CURRENT_VERSION\"/ \"version\": \"$NEW_VERSION\"/" "$PACKAGE_JSON"
|
||||||
|
|
||||||
# Commit the version bump
|
# Commit the version bump
|
||||||
cd "$SCRIPT_DIR"
|
cd "$SCRIPT_DIR"
|
||||||
@@ -113,7 +113,12 @@ for attempt in $(seq 1 $MAX_ATTEMPTS); do
|
|||||||
PATCH=$((PATCH + 1))
|
PATCH=$((PATCH + 1))
|
||||||
NEW_VERSION="$MAJOR.$MINOR.$PATCH"
|
NEW_VERSION="$MAJOR.$MINOR.$PATCH"
|
||||||
|
|
||||||
sed -i "s/\"version\": \"[^\"]*\"/\"version\": \"$NEW_VERSION\"/" "$SCRIPT_DIR/dist/firefox/manifest.json"
|
# Only replace the top-level "version" field, not "manifest_version"
|
||||||
|
sed -i "s/^ \"version\": \"[^\"]*\"/ \"version\": \"$NEW_VERSION\"/" "$SCRIPT_DIR/dist/firefox/manifest.json"
|
||||||
|
|
||||||
|
# Wait before retrying to avoid Mozilla rate limiting
|
||||||
|
echo "Waiting 8 seconds before retry..."
|
||||||
|
sleep 8
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Error: Failed after $MAX_ATTEMPTS attempts."
|
echo "Error: Failed after $MAX_ATTEMPTS attempts."
|
||||||
|
|||||||
Reference in New Issue
Block a user