Example build hardening#1430
Conversation
siku2
left a comment
There was a problem hiding this comment.
I totally agree that we need to keep the examples working while #1418 is in the works. Thanks for taking the time to update the script.
There's currently another pull request which addresses similar problems in the script: #1417.
I think our best course of action is to wait until that PR is merged and then revisit this one, what do you think?
Indeed, I've to wait for #1417 is merged. |
|
@p-alik Happy to report that #1417 has been merged! I would also like to take it one step further by adding a helpful error message if the user tries to run an example that doesn't exist. Currently the error message looks like this, which leaves a lot to be desired: ./run_example.sh: line 63: cd: yew/examples/abc: No such file or directory
[FAIL] Command: "cd "$SRCDIR/$EXAMPLE"" exited with exit code: 1If you don't have time to make these changes let me know, we'll just open a new issue. |
4e3bf87 to
87fd987
Compare
the script exits if without example name parameter or if example directory doesn't exist
87fd987 to
572f97e
Compare
Co-authored-by: Simon <simon@siku2.io>
Co-authored-by: Simon <simon@siku2.io>
|
Thanks for indulging me, @p-alik! |
* run_example.sh checks example existens the script exits if without example name parameter or if example directory doesn't exist * Update examples/run_example.sh Co-authored-by: Simon <simon@siku2.io> * Update examples/run_example.sh Co-authored-by: Simon <simon@siku2.io> Co-authored-by: Simon <simon@siku2.io>
* run_example.sh checks example existens the script exits if without example name parameter or if example directory doesn't exist * Update examples/run_example.sh Co-authored-by: Simon <simon@siku2.io> * Update examples/run_example.sh Co-authored-by: Simon <simon@siku2.io> Co-authored-by: Simon <simon@siku2.io>
Description
The script examples/build.sh should check if approached example (defined by
$1) exists. It should usewasm-packfor todomvc example.I'm aware about Proposal: Replace bash scripts with a Rust CLI, but as long as the script exists in the repository, it should support build of all examples.
Testing instructions
$ for d in ./*; do bn=basename $d; if [ ! -d $d ] || [ $bn = "common" ] || [ $bn = "static" ] || [ $bn = "server" ]; then continue; fi; echo ">$bn<"; ./build.sh $bn; doneI couldn't build
serverexample for same of openssl dependencies yet.