-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
environmentalDependencyCommands #1081
Comments
You could support this use case within the existing API by declaring the command as a script that outputs to a file, has no deps and declares its output. The build script could depend on on the other env command script with And |
ahh, yes, i meant to include that too. here was @aomarks workaround: {
"wireit": {
"generate-git-hash": {
"command": "git rev-parse HEAD > .head"
},
"git-hash": {
"dependencies": [
{
"script": "generate-git-hash",
"cascade": false
}
],
"files": [
".head"
],
"output": []
},
"build": {
"command": "vite",
"dependencies": [
"git-hash"
]
}
}
} thanks for the tip on https://stackoverflow.com/questions/964876/head-and-orig-head-in-git |
Sometimes metadata about the environment is an important input to the build process (for instance, to include a
Built at c9e6ee2
comment at the top of a bundled file).Presently, wireit will return a cached output if the input files haven't changed, even if the environment has. There's no way to declare an explicit dependency on the environment. I propose we change that, with something like this:
where the results of each entry in
environmentalDependencyCommands
would be cached, and a rebuild would be triggered if any of them changed (just like any otherdependency
).In this case, making a git commit would change
HEAD
, which would invalidate the build even if the enumerated files haven't changed.The text was updated successfully, but these errors were encountered: