Skip to content
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

Update Dependencies #16

Merged
merged 1 commit into from
Jul 8, 2024
Merged
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
4 changes: 2 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"sourceType": "module"
},
"rules": {
"no-extra-semi": "off",
"no-undef": "off"
"no-undef": "off",
"no-extra-semi": "off"
}
}
52 changes: 28 additions & 24 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

env:
SRC_DIR: src
PACKAGE_NAME: aviation_tools
CHROME_ID: cjjhackeogffajjndfhemgniokonimin
MOZILLA_ID: [email protected]
MOZILLA_CHANNEL: unlisted
Expand All @@ -17,36 +18,28 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5

outputs:
version: ${{ steps.manifest.outputs.version }}
package_name: ${{ steps.manifest.outputs.package_name }}
#outputs:
# package_name: ${{ steps.manifest.outputs.package_name }}

steps:
- name: "Checkout"
uses: actions/checkout@v4

- name: "Parse Manifest"
id: manifest
run: |-
echo "version=$(jq '.version' < manifest.json | tr -d '"')" >> "$GITHUB_OUTPUT"
export name="$(jq '.name' < manifest.json | tr -d '"' | tr '[:upper:]' '[:lower:]')"
echo "package_name=${name// /_}" >> "$GITHUB_OUTPUT"

- name: "Release Version Check"
if: ${{ github.event_name == 'release' }}
run: |-
echo ${{ github.ref_name }}
echo ${{ steps.manifest.outputs.version }}
if [ "${{ github.ref_name }}" != "${{ steps.manifest.outputs.version }}" ];then
echo "Manifest Version ${version} does not match release tag ${{ github.ref_name }}"
exit 1
fi

- name: "Setup Node"
uses: actions/setup-node@v4
with:
node-version: 20

- name: "Update Manifest Version"
if: ${{ github.event_name == 'release' }}
uses: cssnr/update-json-value-action@master

#- name: "Parse Manifest"
# id: manifest
# run: |-
# export name="$(jq '.name' < manifest.json | tr -d '"' | tr '[:upper:]' '[:lower:]')"
# echo "package_name=${name// /_}" >> "$GITHUB_OUTPUT"

- name: "Build All"
run: |-
npm install
Expand All @@ -59,6 +52,7 @@ jobs:
path: web-ext-artifacts/

- name: "Upload to Release"
if: ${{ github.event_name == 'release' }}
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -80,19 +74,28 @@ jobs:
with:
name: artifacts

- name: "Generate Release Notes"
env:
NOTES: "Full Release Notes: ${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ github.ref_name }}"
uses: jsdaniell/[email protected]
with:
name: "amo-metadata.json"
json: '{"version": {"release_notes": {"en-US": "${{ env.NOTES }}"}}}'

- name: "Sign Mozilla Addon"
run: |-
unzip *firefox* -d src
npx web-ext sign --api-key="${{ secrets.FIREFOX_API_KEY }}" \
--api-secret="${{ secrets.FIREFOX_API_SECRET }}" \
--source-dir "src" \
--channel "${{ env.MOZILLA_CHANNEL }}"
--source-dir="${{ env.SRC_DIR }}" \
--channel="${{ env.MOZILLA_CHANNEL }}" \
--amo-metadata="amo-metadata.json"

- name: "Rename Signed Artifact"
working-directory: web-ext-artifacts
run: |-
ls -l .
mv *.xpi "${{ needs.build.outputs.package_name }}-firefox.xpi"
mv *.xpi "${{ env.PACKAGE_NAME }}-firefox.xpi"
ls -l .

- name: "Upload to Actions"
Expand Down Expand Up @@ -122,10 +125,11 @@ jobs:
uses: actions/checkout@v4

- name: "Mozilla Addon Update"
uses: cssnr/mozilla-addon-update-action@master
uses: cssnr/mozilla-addon-update-action@v1
with:
url: "https://github.com/cssnr/aviation-tools/releases/download/{version}/aviation_tools-firefox.xpi"
addon_id: ${{ env.MOZILLA_ID }}
version: ${{ github.ref_name }}

- name: "Commit files"
run: |
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: "Test"

on:
push:
branches: ["master"]
paths:
- "src/**"
- "tests/**"
pull_request:
branches: ["master"]
paths:
- "src/**"
- "tests/**"
workflow_dispatch:

jobs:
test:
name: "Test"
runs-on: ubuntu-latest
timeout-minutes: 5
if: ${{ !contains(github.event.head_commit.message, '#notest') }}

steps:
- name: "Checkout"
uses: actions/checkout@v4

- name: "Setup Node"
uses: actions/setup-node@v4
with:
node-version: 20

- name: "Install"
run: |
npm install

- name: "Lint"
run: |
npm run lint
4 changes: 2 additions & 2 deletions .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
"singleQuote": true,
"overrides": [
{
"files": ["**/*.html", "**/*.yaml"],
"files": ["**/*.html", "**/*.yaml", "**/*.yml"],
"options": {
"singleQuote": false
}
},
{
"files": ["**/*.json", "**/*.yaml"],
"files": ["**/*.json", "**/*.yaml", "**/*.yml"],
"options": {
"tabWidth": 2
}
Expand Down
44 changes: 29 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,29 @@
[![Chrome Web Store Version](https://img.shields.io/chrome-web-store/v/cjjhackeogffajjndfhemgniokonimin?label=chrome&logo=googlechrome)](https://chrome.google.com/webstore/detail/aviation-tools/cjjhackeogffajjndfhemgniokonimin)
[![GitHub Release Version](https://img.shields.io/github/v/release/cssnr/aviation-tools?logo=github)](https://github.com/cssnr/aviation-tools/releases/latest)
[![Manifest Version](https://img.shields.io/github/manifest-json/v/cssnr/aviation-tools?filename=manifest.json&logo=json&label=manifest)](https://github.com/cssnr/aviation-tools/blob/master/manifest.json)
[![Build](https://github.com/cssnr/aviation-tools/actions/workflows/build.yaml/badge.svg)](https://github.com/cssnr/aviation-tools/actions/workflows/build.yaml)
[![Build](https://img.shields.io/github/actions/workflow/status/cssnr/aviation-tools/build.yaml?logo=github&logoColor=white&label=build)](https://github.com/cssnr/aviation-tools/actions/workflows/build.yaml)
[![Test](https://img.shields.io/github/actions/workflow/status/cssnr/aviation-tools/test.yaml?logo=github&logoColor=white&label=test)](https://github.com/cssnr/aviation-tools/actions/workflows/test.yaml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=cssnr_aviation-tools&metric=alert_status&label=quality)](https://sonarcloud.io/summary/overall?id=cssnr_aviation-tools)
[![Discord](https://img.shields.io/discord/899171661457293343?logo=discord&logoColor=white&label=discord&color=7289da)](https://discord.gg/wXy6m2X8wY)
# Aviation Tools

Upcoming Web Extension with various Aviation Tools...

* [Download](#download)
* [Features](#features)
* [Configuration](#configuration)
* [Support](#support)
* [Development](#development)
- [Chrome Setup](#chrome-setup)
- [Firefox Setup](#firefox-setup)

# Download

<a href="https://chrome.google.com/webstore/detail/aviation-tools/cjjhackeogffajjndfhemgniokonimin" target="_blank">
<img alt="Chrome" src="https://raw.githubusercontent.com/raivo-otp/issuer-icons/master/vectors/google.com/google-chrome.svg" width="42" height="42" /></a>
<a href="https://github.com/cssnr/aviation-tools/releases/latest/download/aviation_tools-firefox.xpi" target="_blank">
<img alt="Firefox" src="https://raw.githubusercontent.com/raivo-otp/issuer-icons/master/vectors/firefox.com/firefox.svg" width="42" height="42" /></a>
<a href="https://chrome.google.com/webstore/detail/aviation-tools/cjjhackeogffajjndfhemgniokonimin" target="_blank">
<img alt="Edge" src="https://raw.githubusercontent.com/raivo-otp/issuer-icons/master/vectors/microsoft.com/microsoft-edge.svg" width="42" height="42" /></a>
<a href="https://chrome.google.com/webstore/detail/aviation-tools/cjjhackeogffajjndfhemgniokonimin" target="_blank">
<img alt="Opera" src="https://raw.githubusercontent.com/raivo-otp/issuer-icons/master/vectors/opera.com/opera.svg" width="42" height="42" /></a>
<a href="https://chrome.google.com/webstore/detail/aviation-tools/cjjhackeogffajjndfhemgniokonimin" target="_blank">
<img alt="Brave" src="https://raw.githubusercontent.com/raivo-otp/issuer-icons/master/vectors/brave.com/brave.svg" width="42" height="42" /></a>
<a href="https://chrome.google.com/webstore/detail/aviation-tools/cjjhackeogffajjndfhemgniokonimin" target="_blank">
<img alt="Vivaldi" src="https://raw.githubusercontent.com/raivo-otp/issuer-icons/master/vectors/vivaldi.com/vivaldi.svg" width="42" height="42" /></a>
[![Chrome](https://raw.githubusercontent.com/smashedr/logo-icons/master/browsers/chrome_48.png)](https://chromewebstore.google.com/detail/aviation-tools/cjjhackeogffajjndfhemgniokonimin)
[![Firefox](https://raw.githubusercontent.com/smashedr/logo-icons/master/browsers/firefox_48.png)](https://github.com/cssnr/aviation-tools/releases/latest/download/aviation_tools-firefox.xpi)
[![Edge](https://raw.githubusercontent.com/smashedr/logo-icons/master/browsers/edge_48.png)](https://chromewebstore.google.com/detail/aviation-tools/cjjhackeogffajjndfhemgniokonimin)
[![Brave](https://raw.githubusercontent.com/smashedr/logo-icons/master/browsers/brave_48.png)](https://chromewebstore.google.com/detail/aviation-tools/cjjhackeogffajjndfhemgniokonimin)
[![Opera](https://raw.githubusercontent.com/smashedr/logo-icons/master/browsers/opera_48.png)](https://chromewebstore.google.com/detail/aviation-tools/cjjhackeogffajjndfhemgniokonimin)
[![Chromium](https://raw.githubusercontent.com/smashedr/logo-icons/master/browsers/chromium_48.png)](https://chromewebstore.google.com/detail/aviation-tools/cjjhackeogffajjndfhemgniokonimin)

All **Chromium** Based Browsers can install the extension from the
[Chrome Web Store](https://chromewebstore.google.com/detail/aviation-tools/cjjhackeogffajjndfhemgniokonimin).
Expand Down Expand Up @@ -55,6 +51,24 @@ You can pin the Addon by clicking the `Puzzle Piece`, find the Aviation Tools (A

To open the options, click on the icon (from above) then click `Open Options`.

# Support

For help using the web extension, utilize any these resources:

- Q&A Discussion: https://github.com/cssnr/aviation-tools/discussions/categories/q-a
- Request a Feature: https://github.com/cssnr/aviation-tools/discussions/categories/feature-requests

If you are experiencing an issue/bug or getting unexpected results, use:

- Report an Issue: https://github.com/cssnr/aviation-tools/issues
- Chat with us on Discord: https://discord.gg/wXy6m2X8wY
- Provide Anonymous Feedback: https://cssnr.github.io/feedback

Logs can be found inspecting the page (Ctrl+Shift+I), clicking on the Console, and;
Firefox: toggling Debug logs, Chrome: toggling Verbose from levels dropdown.

Note: When providing anonymous feedback there is no way to follow up and get more information unless you provide a contact method.

# Development

**Quick Start**
Expand Down Expand Up @@ -116,7 +130,7 @@ For more information on building, see the scripts section in the [package.json](
1. Unzip the archive, place the folder where it must remain and note its location for later.
1. Go to `about:debugging#/runtime/this-firefox` and click `Load Temporary Add-on...`
1. Navigate to the folder you extracted earlier, select `manifest.json` then click `Select File`.
1. Open `about:config` search for `extensions.webextensions.keepStorageOnUninstall` and set to `true`.
1. Optional: open `about:config` search for `extensions.webextensions.keepStorageOnUninstall` and set to `true`.

If you need to test a restart, you must pack the addon. This only works in ESR, Development, or Nightly.
You may also use an Unbranded Build: [https://wiki.mozilla.org/Add-ons/Extension_Signing#Unbranded_Builds](https://wiki.mozilla.org/Add-ons/Extension_Signing#Unbranded_Builds)
Expand Down
Loading