Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • gk/tor-browser
  • peterstory/tor-browser
  • sanketh/tor-browser
  • acat/tor-browser
  • sysrqb/tor-browser
  • boklm/tor-browser
  • dan/tor-browser
  • fabrizio/tor-browser
  • victorvw/tor-browser
  • aguestuser/tor-browser
  • WofWca/tor-browser
  • p13dz/tor-browser
  • mwolfe/tor-browser
  • tpo/applications/tor-browser
  • brade/tor-browser
  • pierov/tor-browser
  • ma1/tor-browser
  • JeremyRand/tor-browser
  • henry/tor-browser
  • msimonelli/tor-browser
  • cypherpunks1/tor-browser
  • blackZwork/tor-browser
  • starlingroot/tor-browser
  • cohosh/tor-browser
  • t-m-w/tor-browser
  • trinity-1686a/tor-browser
  • HHN/tor-browser
  • emmapeel/tor-browser
  • Achintya_Sharma/tor-browser
  • guest475646844/tor-browser
  • Mima/tor-browser
  • morgan/tor-browser
  • clairehurst/tor-browser
  • NoisyCoil/tor-browser
  • gus/tor-browser
  • Francewhoa/tor-browser
  • novialriptide/tor-browser
  • jwilde/tor-browser
  • brizental/tor-browser
  • ourhopeforfreedom/tor-browser
  • onyinyang/tor-browser
  • Noino/tor-browser
  • murmelurmel/tor-browser
43 results
Show changes
Commits on Source (2)
......@@ -2,6 +2,9 @@ stages:
- lint
- update-translations
variables:
IMAGE_PATH: containers.torproject.org/tpo/applications/tor-browser/base:latest
include:
- local: '.gitlab/ci/lint.yml'
- local: '.gitlab/ci/update-translations.yml'
FROM debian:latest
# Base image which includes all* dependencies checked by ./mach configure.
#
# * Actually not all dependencies. WASM sandboxed depencies were left out for now.
# This installs all dependencies checked by `./mach configure --without-wasm-sandboxed-libraries`.
#
# # Building and publishing
#
# Whenever this file changes, the updated Docker image must be built and published _manually_ to
# the tor-browser container registry (https://gitlab.torproject.org/tpo/applications/tor-browser/container_registry/185).
#
# This image copies a script from the taskcluster/ folder, which requires it
# to be built from a folder which is a parent of the taskcluster/ folder.
#
# To build, run:
#
# ```bash
# docker build \
# -f <PATH_TO_DOCKERFILE> \
# -t <REGISTRY_URL>/<IMAGE_NAME>:<IMAGE_TAG>
# .
# ```
#
# For example, when building from the root of this repository to the main tor-browser repository
# and assuming image name to be "base" and tag "latest" -- which is the current terminology:
#
# ```bash
# docker build \
# -f .gitlab/ci/docker/Dockerfile \
# -t containers.torproject.org/tpo/applications/tor-browser/base:latest
# .
# ```
RUN apt-get update && apt-get install -y \
clang \
curl \
git \
libasound2-dev \
libdbus-glib-1-dev \
libgtk-3-dev \
libpango1.0-dev \
libpulse-dev \
libx11-xcb-dev \
libxcomposite-dev \
libxcursor-dev \
libxdamage-dev \
libxi-dev \
libxrandr-dev \
libxtst-dev \
m4 \
mercurial \
nasm \
pkg-config \
python3 \
python3-pip \
unzip \
wget
COPY taskcluster/docker/recipes/install-node.sh /scripts/install-node.sh
RUN chmod +x /scripts/install-node.sh
RUN /scripts/install-node.sh
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
RUN $HOME/.cargo/bin/cargo install cbindgen
WORKDIR /app
CMD ["/bin/bash"]
variables:
# This needs to be kept in sync with the max Python version accepted by ./mach
PYTHON_VERSION: "3.11.7"
.base:
stage: lint
interruptible: true
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
MOZBUILD_STATE_PATH: "$CI_PROJECT_DIR/.cache/mozbuild"
cache:
paths:
- node_modules
- .cache/pip
- .cache/mozbuild
# Store the cache regardless on job outcome
when: 'always'
# Share the cache throughout all pipelines running for a given branch
key: $CI_COMMIT_REF_SLUG
eslint:
extends: .base
image: cimg/python:$PYTHON_VERSION-node
image: $IMAGE_PATH
script:
- .gitlab/ci/scripts/run_linters.py eslint
rules:
......@@ -45,7 +45,7 @@ eslint:
stylelint:
extends: .base
image: cimg/python:$PYTHON_VERSION-node
image: $IMAGE_PATH
script:
- .gitlab/ci/scripts/run_linters.py stylelint
rules:
......@@ -65,7 +65,7 @@ stylelint:
py-black:
extends: .base
image: cimg/python:$PYTHON_VERSION
image: $IMAGE_PATH
script:
- .gitlab/ci/scripts/run_linters.py black
rules:
......@@ -86,7 +86,7 @@ py-black:
py-ruff:
extends: .base
image: cimg/python:$PYTHON_VERSION
image: $IMAGE_PATH
script:
- .gitlab/ci/scripts/run_linters.py ruff
rules:
......@@ -107,7 +107,7 @@ py-ruff:
yaml:
extends: .base
image: cimg/python:$PYTHON_VERSION
image: $IMAGE_PATH
script:
- .gitlab/ci/scripts/run_linters.py yaml
rules:
......@@ -124,7 +124,7 @@ yaml:
shellcheck:
extends: .base
image: cimg/python:$PYTHON_VERSION
image: $IMAGE_PATH
script:
- .gitlab/ci/scripts/run_linters.py shellcheck
rules:
......@@ -140,8 +140,9 @@ shellcheck:
clang-format:
extends: .base
image: cimg/python:$PYTHON_VERSION
image: $IMAGE_PATH
script:
- ./mach configure --without-wasm-sandboxed-libraries --with-base-browser-version=0.0.0
- .gitlab/ci/scripts/run_linters.py clang-format
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
......@@ -161,7 +162,7 @@ clang-format:
rustfmt:
extends: .base
image: cimg/python:$PYTHON_VERSION
image: $IMAGE_PATH
script:
- .gitlab/ci/scripts/run_linters.py rustfmt
rules:
......@@ -177,7 +178,7 @@ rustfmt:
fluent-lint:
extends: .base
image: cimg/python:$PYTHON_VERSION
image: $IMAGE_PATH
script:
- .gitlab/ci/scripts/run_linters.py fluent-lint
rules:
......@@ -194,7 +195,7 @@ fluent-lint:
localization:
extends: .base
image: cimg/python:$PYTHON_VERSION
image: $IMAGE_PATH
script:
- .gitlab/ci/scripts/run_linters.py l10n
rules:
......@@ -213,7 +214,7 @@ localization:
mingw-capitalization:
extends: .base
image: cimg/python:$PYTHON_VERSION
image: $IMAGE_PATH
script:
- .gitlab/ci/scripts/run_linters.py mingw-capitalization
rules:
......@@ -232,7 +233,7 @@ mingw-capitalization:
mscom-init:
extends: .base
image: cimg/python:$PYTHON_VERSION
image: $IMAGE_PATH
script:
- .gitlab/ci/scripts/run_linters.py mscom-init
rules:
......@@ -251,7 +252,7 @@ mscom-init:
file-whitespace:
extends: .base
image: cimg/python:$PYTHON_VERSION
image: $IMAGE_PATH
script:
- .gitlab/ci/scripts/run_linters.py file-whitespace
rules:
......@@ -282,7 +283,7 @@ file-whitespace:
test-manifest:
extends: .base
image: cimg/python:$PYTHON_VERSION
image: $IMAGE_PATH
script:
- .gitlab/ci/scripts/run_linters.py test-manifest-alpha test-manifest-disable test-manifest-skip-if
rules:
......@@ -299,7 +300,7 @@ test-manifest:
trojan-source:
extends: .base
image: cimg/python:$PYTHON_VERSION
image: $IMAGE_PATH
script:
- .gitlab/ci/scripts/run_linters.py trojan-source
rules:
......
......@@ -54,7 +54,7 @@ def get_firefox_tag_from_branch_name(branch_name):
return match.group(0).split()[0]
else:
raise ValueError(
f"Failed to find reference specifier for Firefox tag in branch '{branch_name}'."
f"Failed to find reference specifier for Firefox tag '{tag}' in branch '{branch_name}'."
)
......@@ -98,13 +98,13 @@ if __name__ == "__main__":
)
args = parser.parse_args()
command = [
"./mach",
"lint",
"-v",
*(s for l in args.linters for s in ("-l", l)),
*get_list_of_changed_files(),
]
result = subprocess.run(command, text=True)
sys.exit(result.returncode)
changed_files = get_list_of_changed_files()
if changed_files:
command = ["./mach", "lint", "-v"]
for linter in args.linters:
command.extend(["-l", linter])
command.extend(changed_files)
result = subprocess.run(command, text=True)
sys.exit(result.returncode)
else:
print("No files changed, skipping linting.")