chore: automate compat-data update#14248
Conversation
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/52125/ |
|
Hi there 👋 I finally use the I add a compare script to check if it's relevant to update or not. If commits are equal it throws. To wrap up:
cc @JLHwung |
| - name: Get latest kangax/compat-data commit | ||
| id: lastCommit | ||
| run: echo "::set-output name=sha1::$(node ./scripts/update-compat-data/get-last-commit.sh)" | ||
| - name: Compare last kangax/compat-data commit with current one |
There was a problem hiding this comment.
I don't think that we need this step; we don't have it for the parser tests updater.
There was a problem hiding this comment.
Thanks for your feedback @nicolo-ribaudo 🙌 :)
My initial was to avoid useless computations, doesn't that make sense?
| set -e | ||
| export GIT_DIR=./packages/babel-compat-data/build/compat-table | ||
| git fetch -q origin HEAD | ||
| git rev-parse FETCH_HEAD |
There was a problem hiding this comment.
Since this script and bump-data-compat-version.sh are not used anywhere else, we could just inline them in the action as a single step:
- name: Update to latest kangax/compat-data commit
run: perl -i -pe 's/^COMPAT_TABLE_COMMIT.+$/COMPAT_TABLE_COMMIT='$(git rev-parse FETCH_HEAD)'/' ./packages/babel-compat-data/download-compat-table.sh
with:
GIT_DIR: ./packages/babel-compat-data/build/compat-tableThere was a problem hiding this comment.
I think it is good to leave it as-is: It is more convenient to debug the update workflow in local machine.
There was a problem hiding this comment.
I'm okay with the bot approach here ^^
1246873 to
4a58c22
Compare
c11c42f to
8997ec2
Compare
8997ec2 to
19a760e
Compare
b28a485 to
13d996c
Compare
Co-authored-by: Armano <armano2@users.noreply.github.com>
|
This works! Action run: https://github.com/nicolo-ribaudo/babel/runs/6692355681 |
|
I'm merging this to test if it also works in this repo, or if there are any permissions problems. |
Hi 👋
This pull request tends to automate compat-data update.
@JLHwung shows me the
Test262automation as a model for this one:shain the./packages/babel-compat-data/download-compat-table.shA word about testing: nothing in the
scriptsfolder was tested. I'd like to create a sub-foldertestand add a test for the js script. WDYT?