This repository was archived by the owner on Apr 28, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 39
Firefox extension #243
Merged
Merged
Firefox extension #243
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
3efad4e
Make extension work on Firefox
deansheather 87f05b6
Add Firefox native messaging manifest installer
deansheather 74c0dbd
Change help text to match new command name
deansheather c7e8dc1
Add web-ext build steps
deansheather f84b707
Flatten built extension, improve build script
deansheather File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,6 @@ | ||
| node_modules | ||
| out | ||
| *.zip | ||
| *.xpi | ||
| *.zip | ||
| node_modules/ | ||
| out/ | ||
| packed-extensions/ | ||
| web-ext-artifacts/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,25 @@ | ||
| #!/bin/bash | ||
| #!/usr/bin/env bash | ||
|
|
||
| zip -R extension manifest.json out/* logo128.png | ||
| set -e | ||
|
|
||
| cd $(dirname "$0") | ||
|
|
||
| VERSION=$(jq -r ".version" ./manifest.json) | ||
| SRC_DIR="./out" | ||
| OUTPUT_DIR="./packed-extensions" | ||
|
|
||
| mkdir -p "$OUTPUT_DIR" | ||
|
|
||
| # Firefox extension (done first because web-ext verifies manifest) | ||
| if [ -z "$WEB_EXT_API_KEY" ]; then | ||
| web-ext build --source-dir="$SRC_DIR" --artifacts-dir="$OUTPUT_DIR" --overwrite-dest | ||
| mv "$OUTPUT_DIR/sail-$VERSION.zip" "$OUTPUT_DIR/sail-$VERSION.firefox.zip" | ||
| else | ||
| # Requires $WEB_EXT_API_KEY and $WEB_EXT_API_SECRET from addons.mozilla.org. | ||
| web-ext sign --source-dir="$SRC_DIR" --artifacts-dir="$OUTPUT_DIR" --overwrite-dest | ||
| mv "$OUTPUT_DIR/sail-$VERSION.xpi" "$OUTPUT_DIR/sail-$VERSION.firefox.xpi" | ||
| fi | ||
|
|
||
| # Chrome extension | ||
| rm "$OUTPUT_DIR/sail-$VERSION.chrome.zip" || true | ||
| zip -R "$OUTPUT_DIR/sail-$VERSION.chrome.zip" "$SRC_DIR/*" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably a more generic message here sincr we're aiming for two vendors