diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 421720e468..e468c47091 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,5 +16,5 @@ repos: name: Synchronize PR check workflows files: ^.github/workflows/__.*\.yml$|^pr-checks language: system - entry: python3 pr-checks/sync.py + entry: pr-checks/sync.sh pass_filenames: false diff --git a/justfile b/justfile new file mode 100644 index 0000000000..9bc9831373 --- /dev/null +++ b/justfile @@ -0,0 +1,10 @@ +# Sync generated files (javascript and PR checks) +sync: build update-pr-checks + +# Perform all necessary steps to update the PR checks +update-pr-checks: + pr-checks/sync.sh + +# Transpile typescript code into javascript +build: + npm run build diff --git a/pr-checks/justfile b/pr-checks/justfile index 00432c0ff4..245ca0a6a7 100644 --- a/pr-checks/justfile +++ b/pr-checks/justfile @@ -1,6 +1 @@ -# Perform all necessary steps to update the PR checks -update-pr-checks: - python3 -m venv env - source env/bin/activate - pip3 install ruamel.yaml - python3 sync.py +set fallback := true diff --git a/pr-checks/sync.sh b/pr-checks/sync.sh new file mode 100755 index 0000000000..a2db197426 --- /dev/null +++ b/pr-checks/sync.sh @@ -0,0 +1,9 @@ +#!/bin/bash +set -e + +cd "$(dirname "$0")" +python3 -m venv env +source env/bin/activate +pip3 install ruamel.yaml +python3 sync.py +