Skip to content

Commit

Permalink
Make htmltest-config a fix command rather than update
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin committed Nov 8, 2024
1 parent 0943d57 commit 491d92c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
- name: Any files need updating?
run: |
git restore package.json
echo "If the following fails, then either run 'npm run fix:htmltest-config' locally or '/fix:htmltest-config' in GitHub"
npm run _diff:fail
- uses: actions/upload-artifact@v4
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pr-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ jobs:
- name: Extract action name
id: extract_action_name
run: |
PR_ACTION=$(echo $COMMENT | grep -oP '/fix:\K\w+')
PR_ACTION=$(echo $COMMENT | grep -oP '/fix:\K[-_0-9a-z]+')
echo "Action is $PR_ACTION"
ACTION_NAMES="all|dict|filenames|format|i18n|markdown|refcache|submodules?|text"
ACTION_NAMES="all|dict|filenames|format|htmltest-config|i18n|markdown|refcache|submodules?|text"
if [[ ! "$PR_ACTION" =~ ^($ACTION_NAMES)$ ]]; then
echo "Invalid action name: $PR_ACTION"
echo "Action name should be one of: $ACTION_NAMES"
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
all|refcache)
npm install --omit=optional
;&
dict|filenames|format|markdown|submodule*)
dict|filenames|format|htmltest-config|markdown|submodule*)
npm run fix:$PR_ACTION
;;
esac
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,17 @@
"check:text": "npm run _check:text -- ",
"check": "npm run seq -- $(npm run -s _list:check:*)",
"clean": "make clean",
"code-excerpts": "rm -Rf tmp/excerpts/* && npm run seq -- code-excerpts:get code-excerpts:update-docs",
"code-excerpts:get": "cd tools && dart run build_runner build --delete-conflicting-outputs --output ../tmp/excerpts",
"code-excerpts:update-docs": "cd tools && dart run code_excerpt_updater --fragment-dir-path ../tmp/excerpts --src-dir-path examples --yaml --write-in-place content",
"code-excerpts": "rm -Rf tmp/excerpts/* && npm run seq -- code-excerpts:get code-excerpts:update-docs",
"cp:spec": "scripts/content-modules/cp-pages.sh",
"diff:check": "npm run _diff:check || (echo; echo 'WARNING: the files above have not been committed'; echo)",
"diff:fail": "npm run _diff:check || (echo; echo 'ERROR: the files above have changed. Locally rerun `npm run test-and-fix` and commit changes'; echo; exit 1)",
"fix:all": "npm run all -- $(npm -s run _list:fix:*)",
"fix:dict": "find content/en layouts -name \"*.md\" -print0 | xargs -0 scripts/normalize-cspell-front-matter.pl",
"fix:filenames": "npm run _rename-to-kebab-case",
"fix:format": "npm run format",
"fix:htmltest-config": "scripts/htmltest-config.sh",
"fix:i18n:all": "scripts/check-i18n.sh -a -c HEAD",
"fix:i18n:drifted": "scripts/check-i18n.sh -c HEAD",
"fix:i18n:new": "scripts/check-i18n.sh -n -c HEAD",
Expand All @@ -87,8 +88,8 @@
"prebuild:preview": "npm run _prebuild",
"prebuild:production": "npm run _prebuild",
"prebuild": "npm run _prebuild",
"precheck:links:internal": "npm run build && npm run update:htmltest-config",
"precheck:links": "npm run build && npm run update:htmltest-config",
"precheck:links:internal": "npm run build && npm run fix:htmltest-config",
"precheck:links": "npm run build && npm run fix:htmltest-config",
"prefix:submodule": "npm run update:submodule",
"prepare": "npm run seq -- get:submodule _prepare:docsy",
"preserve:hugo": "npm run _prebuild",
Expand All @@ -100,7 +101,6 @@
"serve": "npm run serve:hugo --",
"test-and-fix": "npm run seq -- fix:submodule $(npm -s run _list:fix:for-test-and-fix) $(npm -s run _list:check:for-test-and-fix)",
"test": "npm run check",
"update:htmltest-config": "scripts/htmltest-config.sh",
"update:pkg:hugo": "npm install --save-dev --save-exact hugo-extended@latest",
"update:pkgs": "npx npm-check-updates -u",
"update:submodule": "set -x && git submodule update --remote ${DEPTH:- --depth 999}"
Expand Down

0 comments on commit 491d92c

Please sign in to comment.