CI script changes to fail on diff (#2364)

This commit is contained in:
Patrice Chalin 2023-02-19 12:50:58 -05:00 committed by GitHub
parent c9f3f768f5
commit f69219ffe7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 5 deletions

View File

@ -126,7 +126,7 @@ All matched files use Prettier code style!
To _fix_ formatting run:
```console
$ npm run check:formatting -- --write
$ npm run prettier:write
```
### Submodule changes

View File

@ -1,9 +1,9 @@
[build]
publish = "public"
command = "npm run build:preview"
command = "npm run s build:preview diff:fail"
[context.production]
command = "npm run build:production"
command = "npm run s build:production diff:fail"
[[redirects]]
from = "https://docs.opentelemetry.io/*"

View File

@ -8,6 +8,7 @@
"scripts": {
"__check:links": "make --keep-going check-links",
"_build": "hugo --cleanDestinationDir -e dev -DFE",
"_check:formatting": "npx prettier --check .",
"_check:links": "HTMLTEST_ARGS='--log-level 1' npm run __check:links",
"_check:links:internal": "npm run __check:links",
"_get:no": "echo SKIPPING get operation",
@ -15,7 +16,7 @@
"_get:submodule": "set -x && git submodule update --init ${DEPTH:- --depth 1}",
"_prebuild": "run-s get:submodule cp:spec",
"_prepare:docsy": "cd themes/docsy && npm install",
"_serve:hugo": "hugo serve --disableFastRender -DFE --minify",
"_serve:hugo": "hugo serve -DFE --minify",
"_serve": "netlify dev -c \"npm run _serve:hugo\"",
"all": "npm-run-all",
"build:preview": "set -x && npm run _build -- --minify --baseURL \"${DEPLOY_PRIME_URL:-/}\"",
@ -23,11 +24,13 @@
"build": "npm run _build",
"cd:public": "cd public &&",
"check": "npm run all -- check:*",
"check:formatting": "npx prettier --check .",
"check:formatting": "npm run _check:formatting || (echo '[help] Run: npm run prettier:write'; exit 1)",
"check:links": "npm run _check:links",
"check:links:internal": "npm run _check:links:internal",
"clean": "make clean",
"cp:spec": "./scripts/content-modules/cp-pages.sh",
"diff:check": "git diff --name-only --exit-code || (echo; echo 'WARNING: the files above have not been committed'; echo)",
"diff:fail": "git diff --name-only --exit-code || (echo; echo 'ERROR: the files above have changed. Locally rerun `npm run test` and commit changes'; echo; exit 1)",
"get:submodule": "npm run _get:${GET:-submodule}",
"make:public": "make public ls-public",
"postbuild:preview": "npm run _check:links",
@ -40,6 +43,7 @@
"prepare": "run-s get:submodule _prepare:docsy",
"preserve:hugo": "npm run _prebuild",
"prettier:no-ignore": "npx prettier --ignore-path ''",
"prettier:write": "npm run _check:formatting -- --write",
"preserve": "npm run _prebuild",
"s": "run-s",
"schemas:update": "npm run update:submodule content-modules/opentelemetry-specification",