forked from mozilla-extensions/firefox-translations
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from motin/restore-compatibility-with-latest-ni…
…ghtly Restore compatibility with latest nightly (and make this fork up to date in general)
- Loading branch information
Showing
96 changed files
with
3,070 additions
and
711 deletions.
There are no files selected for viewing
This file contains 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,7 +1,9 @@ | ||
version: 2.1 | ||
|
||
jobs: | ||
build_and_test_extension: | ||
########################################################################### | ||
# Ordinary "build and test" CI flow | ||
build-and-test-extension: | ||
docker: | ||
- image: circleci/node:latest-browsers | ||
|
||
|
@@ -109,8 +111,124 @@ jobs: | |
path: "test/e2e/results" | ||
destination: "test/e2e/results" | ||
|
||
workflows: | ||
########################################################################### | ||
# Docs | ||
generate-docs: | ||
docker: | ||
- image: circleci/node:latest-browsers | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- dependencies-{{ checksum "docs/package.json" }} | ||
- run: | ||
name: Install npm deps | ||
command: cd docs && yarn install --immutable | ||
- save_cache: | ||
paths: | ||
- node_modules | ||
key: dependencies-{{ checksum "docs/package.json" }} | ||
- run: | ||
name: Upgrade packages | ||
command: sudo apt update | ||
- run: | ||
name: Install Aspell and Rust | ||
command: sudo apt install aspell aspell-en rustc | ||
- run: | ||
name: Version information | ||
command: rustc --version; cargo --version; aspell --version; yarn --version | ||
- run: | ||
name: Install mdbook-dtmo | ||
command: | | ||
MDBOOK_VERSION=0.8.1 | ||
MDBOOK="mdbook-dtmo-${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz" | ||
MDBOOK_SHA256=5b8fc7444816c685ae6a3018e6168844a2fcde73e681a9bfbe4775f361dec64c | ||
curl -sfSL --retry 5 -O "https://github.com/badboy/mdbook-dtmo/releases/download/${MDBOOK_VERSION}/${MDBOOK}" | ||
echo "${MDBOOK_SHA256} *${MDBOOK}" | shasum -a 256 -c - | ||
tar -xvf "${MDBOOK}" | ||
# We rename it to mdbook here, so other tools keep working as expected | ||
mkdir -p ~/.local/bin/ | ||
mv mdbook-dtmo ~/.local/bin/mdbook | ||
mdbook --version | ||
- run: | ||
name: Generate API docs | ||
command: cd docs && yarn generate-api-docs | ||
- run: | ||
name: Build documentation | ||
command: cd docs && yarn build | ||
- run: | ||
name: Check documentation links | ||
command: cd docs && yarn linkcheck | ||
- persist_to_workspace: | ||
root: build/ | ||
paths: | ||
- docs/user | ||
- docs/dev | ||
- docs/shared | ||
- docs/index.html | ||
|
||
docs-spellcheck: | ||
docker: | ||
# This is a separate job so that we can use Ubuntu Focal (20.04) and that | ||
# way get aspell 0.60.8 or later (which contains markdown support) | ||
- image: circleci/buildpack-deps:focal | ||
steps: | ||
- checkout | ||
- run: | ||
name: Upgrade packages | ||
command: sudo apt update | ||
- run: | ||
name: Install aspell | ||
command: sudo apt install aspell aspell-en | ||
- run: | ||
name: Check documentation spelling | ||
command: cd docs && bin/spellcheck.sh list | ||
|
||
build-and-test: | ||
# via https://circleci.com/blog/deploying-documentation-to-github-pages-with-continuous-integration/ | ||
docs-deploy: | ||
docker: | ||
- image: node:8.10.0 | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: build/ | ||
- run: | ||
name: Disable jekyll builds | ||
command: touch build/docs/.nojekyll | ||
- run: | ||
name: Show contents | ||
command: ls -R | ||
# Needed for write access to the GitHub repository; | ||
# see https://circleci.com/docs/2.0/gh-bb-integration/#deployment-keys-and-user-keys | ||
- add_ssh_keys: | ||
fingerprints: | ||
- "15:15:41:db:aa:14:12:c6:a5:53:e1:06:e9:e6:a1:57" | ||
# The gh-pages npm package can be used to push a directory to a git branch; | ||
# see https://www.npmjs.com/package/gh-pages | ||
- run: | ||
name: Deploy docs to gh-pages branch | ||
command: | | ||
git config user.email "ci-docs-deploy@firefox-translations" | ||
git config user.name "CircleCI docs-deploy job" | ||
npm install -g --silent [email protected] | ||
gh-pages --dotfiles --message "[skip ci] Updates" --dist build/docs | ||
########################################################################### | ||
# Workflows | ||
|
||
workflows: | ||
version: 2 | ||
ci: | ||
jobs: | ||
- build_and_test_extension | ||
- build-and-test-extension | ||
- generate-docs | ||
- docs-spellcheck: | ||
requires: | ||
- generate-docs | ||
- docs-deploy: | ||
requires: | ||
- docs-spellcheck | ||
filters: | ||
branches: | ||
only: main |
This file contains 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 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 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,13 +1,17 @@ | ||
# Bergamot Translate Browser Extension | ||
``` | ||
This repo has been archived and the work on Firefox Translations will continue here: | ||
https://github.com/mozilla/firefox-translations | ||
``` | ||
# Firefox Translations Web Extension | ||
|
||
[![CircleCI badge](https://img.shields.io/circleci/project/github/mozilla-extensions/bergamot-browser-extension/main.svg?label=CircleCI)](https://circleci.com/gh/mozilla-extensions/bergamot-browser-extension/) | ||
[![CircleCI badge](https://img.shields.io/circleci/project/github/mozilla-extensions/firefox-translations/main.svg?label=CircleCI)](https://circleci.com/gh/mozilla-extensions/firefox-translations/) | ||
|
||
For more information see [The Bergamot Project website](https://browser.mt/). | ||
|
||
## Installation instructions | ||
## Installation and usage instructions | ||
|
||
See [docs/INSTALL.md](./docs/INSTALL.md) for instructions on how to get a pre-released version of the extension running locally. | ||
See [this document](https://mozilla-extensions.github.io/firefox-translations/user/index.html) for instructions on how to get a pre-released version of the extension running locally. | ||
|
||
## Developer documentation | ||
|
||
See [docs/DEV.md](./docs/DEV.md) for details on how to work with this extension as a developer. | ||
See [this document](https://mozilla-extensions.github.io/firefox-translations/dev/index.html) for details on how to work with this extension as a developer. |
This file contains 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 |
---|---|---|
|
@@ -14,7 +14,9 @@ const targetBrowser = process.env.TARGET_BROWSER; | |
const ui = process.env.UI; | ||
|
||
let extensionBuildEnvironment; | ||
if (process.env.CIRCLECI === "true") { | ||
if (process.env.MC === "1") { | ||
extensionBuildEnvironment = "mozilla"; | ||
} else if (process.env.CIRCLECI === "true") { | ||
extensionBuildEnvironment = "circleci"; | ||
} else if (process.env.CI === "true") { | ||
extensionBuildEnvironment = "ci"; | ||
|
@@ -27,7 +29,11 @@ if (targetEnvironment !== "production") { | |
|
||
const extensionId = | ||
ui === "firefox-infobar-ui" | ||
? "[email protected]" | ||
? `${ | ||
process.env.MC === "1" | ||
? "[email protected]" | ||
: "[email protected]" | ||
}` | ||
: "[email protected]"; | ||
|
||
const buildPath = path.join( | ||
|
This file contains 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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
personal_ws-1.1 en 36 utf-8 | ||
BERGAMOT | ||
Bergamot | ||
CircleCI | ||
Geckodriver | ||
Github | ||
MPL | ||
PRs | ||
README | ||
TypeDoc | ||
UI | ||
WASM | ||
Webpage | ||
XQuartz | ||
aspell | ||
bergamot | ||
cli | ||
codebase | ||
config | ||
deps | ||
eg | ||
env | ||
erDiagram | ||
geckodriver | ||
infobar | ||
js | ||
mdBook | ||
mitmproxy | ||
monolingually | ||
pre | ||
programme | ||
repo | ||
submodule | ||
submodules | ||
typedoc | ||
ui | ||
webpack |
This file contains 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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# don't lint/format generated files | ||
dev/api-docs/ | ||
dev/api-docs-summary.md | ||
# don't lint/format package.json since npm install formats it differently by default | ||
package.json | ||
# don't lint/format third party modules | ||
node_modules/ | ||
user/*.js | ||
shared/mermaid.min.js |
This file contains 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
dev/api-docs/ | ||
dev/api-docs-summary.md |
Oops, something went wrong.