Open aalmiray opened 3 years ago
thanks for the bug @aalmiray - whats worse is that if doing a clean build even jbang.cmd/jbang/jbang.ps1 are missing which got into 0.82 release ...sometihng definitely wonky here.
would it not be enough to make versiontxt dependent on assemble ?
No, I don't think it would be enough as assemble
depends on the distribution tasks already. Gradle usually runs tasks in alphabetical order when there are no dependencies between them thus versionText
might run after the distribution tasks that require its outputs.
You can either add a task dependency (explicit, old idiom) or add an input file dependency (new idiom).
"add an input file dependency (new idiom)." ... how would that work?
It would look something like this https://docs.gradle.org/current/userguide/more_about_tasks.html#sec:runtime_api_for_adhoc
FWIW explicit task dependency (old idiom) is the easiest way to make it work. Will only become a problem in Gradle 8.0 when this option is flagged as an error or gets removed.
Apparently the build is set to copy
tmp/version.txt
into the generated distributionhttps://github.com/jbangdev/jbang/blob/3adf1b50133ccd652048aeed2b6173e93940a77c/build.gradle#L116-L130
However this file is not created at the appropriate time and it's missing from the final distribution archives
If this file is to be included then the
versionTxt()
task must be set as a dependency ordistZip
,distTar
,latestDistZip
, andlatestDistTar
.