Repository navigation
Conversation
d0fb35d to
cda670f
Compare
|
@arnaud-lb would you mind to review and merge? |
arnaud-lb
left a comment
There was a problem hiding this comment.
I don't really understand the benefits of this script. Generating adds complexity and reduces flexibility.
If we want to de-duplicate the steps in .github/workflows/verify-bundled-files.yml, maybe we can factor them in some way?
For the if condition:
env:
CHECK_ALL: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
steps:
- name: xxhash
if: ${{ !cancelled() && (steps.changes.outputs.xxhash == 'true' || env.CHECK_ALL == 'true') }}For the run script:
run: .github/scripts/download-and-verify.sh xxhash.sh xxhash.sh|
I have addressed your feedback, thank you for it. About your question above - the workflow file needs the paths/names on several places and this is impossible to achieve by YAML grammar only without specifying it manually on several places. Even with few bundled sources now it saved me a lot of time and typos. And there are many more sources that can be added :) |
|
|
||
| tmp_dir=%tmp_dir% | ||
| rm -rf "$tmp_dir" | ||
| # header above this line is generated by make-workflow-file.php |
There was a problem hiding this comment.
This is better, but generating this header is not saving a lot. May I suggest that we use a include instead?
common.sh:
#!/bin/sh
set -ex
change_to_root_dir() {
cd "$(dirname "$1")/../../.."
}
make_temp_dir() {
local tmp_dir="/tmp/download-bundled-$(basename "$1")"
rm -rf "$tmp_dir"
echo "$tmp_dir"
}boost-context.sh:
#!/bin/sh
change_to_root_dir "$0"
tmp_dir="$(make_temp_dir "$0")"
...
part of #19802
In the generator there is a manual how to use it.
The script allows:
.github/workflows/verify-bundled-files.yml) fully.github/scripts/download-bundled/*.shdownload scriptNo AI was used :)