Skip to content
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
2 changes: 1 addition & 1 deletion doc/DEVELOPMENT.org
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ I'm not against it, but with limited time resources full-scale tests give better

* Run end-to-end tests

End-to-end test go thought the full cycle from indexing & backend to automated extension tests, and are very helpful to make sure you don't break things.
End-to-end tests go through the full cycle from indexing & backend to automated extension tests, and are very helpful to make sure you don't break things.

You need:

Expand Down
13 changes: 8 additions & 5 deletions extension/build
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import argparse
import os
from subprocess import check_call
from pathlib import Path
from sys import platform

# right, specifying id in manifest doesn't seem to work
# AMO responds with: Server response: Duplicate add-on ID found. (status: 400)
Expand All @@ -17,6 +18,8 @@ TARGETS = [
'firefox',
]

npm = "npm.cmd" if platform == "win32" else "npm"

def main() -> None:
p = argparse.ArgumentParser()
p.add_argument('--release', action='store_true', help="Use release flavor of build")
Expand All @@ -39,7 +42,7 @@ def main() -> None:
artifacts_dir = (base_ext_dir / 'artifacts' / target).resolve()
def webext(*args, **kwargs) -> None:
check_call([
'npm', 'run', 'web-ext',
npm, 'run', 'web-ext',
'--',
'--source-dir' , ext_dir,
'--artifacts-dir', artifacts_dir,
Expand All @@ -56,13 +59,13 @@ def main() -> None:

if args.watch:
check_call([
'npm', 'run', 'watch',
npm, 'run', 'watch',
], env=env, cwd=str(Path(__file__).absolute().parent))
# TODO exec instead?
return

check_call([
'npm', 'run', 'build',
npm, 'run', 'build',
], env=env, cwd=str(Path(__file__).absolute().parent))

if args.lint:
Expand Down Expand Up @@ -91,7 +94,7 @@ def main() -> None:
assert args.release
if 'firefox' in target:
check_call([
'npm', 'run', 'release:amo',
npm, 'run', 'release:amo',
'--',
'--channel', args.publish,
'--source-dir', str(ext_dir),
Expand All @@ -101,7 +104,7 @@ def main() -> None:
assert args.publish == 'listed' # no notion of unlisted on chrome store?
from chrome_dev_secrets import CLIENT_ID, CLIENT_SECRET, REFRESH_TOKEN
check_call([
'npm', 'run', 'release:cws',
npm, 'run', 'release:cws',
'--',
'upload',
# '--auto-publish',
Expand Down
1 change: 1 addition & 0 deletions scripts/promnesia
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ PPATH="$GIT_ROOT_DIR/src$PPATH"
export DIRTY_RUN='YES' # ugh.

if command -v python3 &> /dev/null; then
# Note: python3 in Windows used "py" in command line. So $PY_BIN should be just "py"
PY_BIN="python3"
else
PY_BIN="python" # warn?
Expand Down