mirror of
https://github.com/servo/servo.git
synced 2025-08-18 03:45:33 +01:00
Auto merge of #12295 - jimberlage:12158/shell-linting, r=aneeshusa
Add linting for shell scripts <!-- Please describe your changes on the following line: --> This changes tidy to check shell scripts for the proper shebang and options. It does not check that variables are formatted correctly. It also adds a check for the MPL 2.0 license in shell scripts. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #12158 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12295) <!-- Reviewable:end -->
This commit is contained in:
commit
4bc629b369
10 changed files with 104 additions and 13 deletions
|
@ -1,12 +1,17 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# Make sure listed files do not contain "unwrap"
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
cd "$(git rev-parse --show-toplevel)" # cd into repo root so make sure paths works in any case
|
||||
# cd into repo root to make sure paths work in any case
|
||||
cd "$(git rev-parse --show-toplevel)"
|
||||
|
||||
# files that should not contain "unwrap"
|
||||
FILES=("components/compositing/compositor.rs"
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
@ -7,8 +11,8 @@ set -o pipefail
|
|||
# We shouldn't need any binary at all to update the manifests.
|
||||
# Adding "SKIP_TESTS" to skip tests, it doesn't really skip the tests.
|
||||
# It will run "run_wpt" with "'test_list': ['SKIP_TESTS']",
|
||||
# and then pass it into wptrunner, which won't be able to find any tests named "SKIP_TESTS",
|
||||
# and thus won't run any.
|
||||
# and then pass it into wptrunner, which won't be able to find any tests named
|
||||
# "SKIP_TESTS", and thus won't run any.
|
||||
# Adding "--binary=" to skip looking for a compiled servo binary.
|
||||
./mach test-wpt --manifest-update --binary= SKIP_TESTS > /dev/null
|
||||
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# Helper script to upload docs to doc.servo.org.
|
||||
# Requires ghp-import (from pip)
|
||||
# GitHub API token must be passed in environment var TOKEN
|
||||
|
@ -16,7 +20,8 @@ cp etc/doc.servo.org/* target/doc/
|
|||
|
||||
python components/style/properties/build.py servo html
|
||||
|
||||
OUT_DIR="`pwd`/target/doc/servo" make -f makefile.cargo -C components/script dom_docs
|
||||
OUT_DIR="$(pwd)/target/doc/servo" \
|
||||
make -f makefile.cargo -C components/script dom_docs
|
||||
rm -rf target/doc/servo/.cache
|
||||
|
||||
ghp-import -n target/doc
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
@ -12,7 +16,7 @@ usage() {
|
|||
|
||||
|
||||
upload() {
|
||||
local package_filename
|
||||
local package_filename
|
||||
package_filename="$(basename "${2}")"
|
||||
local -r nightly_upload_dir="s3://servo-builds/nightly/${1}"
|
||||
local -r package_upload_path="${nightly_upload_dir}/${package_filename}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue