Skip to content

chore: Drop Manifest v2 for Firefox #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
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
31 changes: 1 addition & 30 deletions .github/scripts/run-firefox.sh
Original file line number Diff line number Diff line change
@@ -1,32 +1,3 @@
#!/usr/bin/env bash

setup() {
# Ensure files to move exist
if [ ! -f manifest-v2.json ] || [ ! -f manifest.json ]; then
echo "manifest-v2.json or manifest.json was not found. Please run this script from the root of the extension."
exit 1
fi
# Copy the v2 manifest to use instead of the v3 manifest
mv manifest.json manifest-v3.json && mv manifest-v2.json manifest.json
# Run cleanup in case of Ctrl+C
trap cleanup SIGINT
}

cleanup() {
# Ensure files to move exist
if [ ! -f manifest-v3.json ] || [ ! -f manifest.json ]; then
echo "manifest-v3.json or manifest.json was not found. Please run this script from the root of the extension."
exit 1
fi
# Copy the v3 manifest back to the v2 manifest
mv manifest.json manifest-v2.json && mv manifest-v3.json manifest.json
}

run() {
# Run extension in Firefox development mode
web-ext run
}

setup
run
cleanup
web-ext run
31 changes: 1 addition & 30 deletions .github/scripts/sign-firefox.sh
Original file line number Diff line number Diff line change
@@ -1,32 +1,3 @@
#!/usr/bin/env bash

setup() {
# Ensure files to move exist
if [ ! -f manifest-v2.json ] || [ ! -f manifest.json ]; then
echo "manifest-v2.json or manifest.json was not found. Please run this script from the root of the extension."
exit 1
fi
# Copy the v2 manifest to use instead of the v3 manifest
mv manifest.json manifest-v3.json && mv manifest-v2.json manifest.json
# Run cleanup in case of Ctrl+C
trap cleanup SIGINT
}

cleanup() {
# Ensure files to move exist
if [ ! -f manifest-v3.json ] || [ ! -f manifest.json ]; then
echo "manifest-v3.json or manifest.json was not found. Please run this script from the root of the extension."
exit 1
fi
# Copy the v3 manifest back to the v2 manifest
mv manifest.json manifest-v2.json && mv manifest-v3.json manifest.json
}

sign() {
# Sign the Firefox extension
web-ext sign --api-key=$JWT_USER --api-secret=$JWT_SECRET
}

setup
sign
cleanup
web-ext sign --api-key=$JWT_USER --api-secret=$JWT_SECRET
45 changes: 0 additions & 45 deletions manifest-v2.json

This file was deleted.

3 changes: 1 addition & 2 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,5 @@
"32": "images/logo32.png",
"48": "images/logo48.png",
"128": "images/logo128.png"
},
"host_permissions": ["https://api.pushshift.io/reddit/search/*"]
}
}