Closed AndiDog closed 1 year ago
Hi, due to personal circumstances I did not look into this project for a while, but now I am back and happy to take a look. Sorry that I ignored this for so long, please let me know if you no longer have time for this.
I've merged the offered dart template, so it may conflict now
Yes indeed, the existing Dart template that you added in December works. But often times, a program doesn't just have a single file (with a main
function, for example), but more dependencies. And scriptisto should rebuild in that case. What about we add such a more complex template, separate from the simple template? I can adjust the PR accordingly if you agree.
Ok, I think I now understand what this feature does. I was assuming before that it hashes files in the target directory, not in the script directory. In that case it was not clear how is it different from just using files
.
I am happy to accept the change with a few changes:
dart_multifile
or feel free to suggest a better name.cli/main.dart
is already there and later on I can write a Wiki section and include a reference to it. It's just comments from the documentation and comments from the scriptisto settings merge into a single wall and it makes the feature demonstration harder.hash_additional_paths
from what it does to what it is. Instead of having an implementation detail in the name (the fact that it will hash something), we could just name it extra_src
or extra_src_paths
or something similar.cache_dir="$(pwd)" && cd "$(dirname "${SCRIPTISTO_SOURCE}")"
just looks like an extra feature where we simply could say build_in_script_dir: true
and make the SCRIPTISTO_CACHE_DIR
available to build_cmd
instead of the cache_dir
. Does it look like a good feature? Thank you for your pull request!
Applied all your suggestions and rebased onto latest master
😀
Released 2.1.0. Thank you for your contribution!
Sorry, didn't open an issue before. Please add one if this feature isn't clear. To me, hashing more than just the script file itself is essential since many programs consist of multiple source files. This change allows listing files and directories which will trigger a rebuild if their modification time changed (same as scriptisto already does on the source script file). A new Dart template was added and used as show case for an – also new –
SCRIPTISTO_CACHE_DIR
environment variable, which helps the script access any further built artifacts.