2
0
Fork 0
mirror of https://github.com/ethauvin/bld.git synced 2025-04-25 08:17:11 -07:00

Fixed zip distribution generation, using the actual wrapper jar of the current repo state

This commit is contained in:
Geert Bevin 2023-05-12 08:54:09 -04:00
parent c459298bf9
commit e99c28e5f8
2 changed files with 10 additions and 4 deletions

Binary file not shown.

View file

@ -5,11 +5,10 @@
package rife; package rife;
import rife.bld.BuildCommand; import rife.bld.BuildCommand;
import rife.bld.dependencies.VersionNumber; import rife.bld.Cli;
import rife.bld.extension.ZipOperation; import rife.bld.extension.ZipOperation;
import rife.bld.operations.*; import rife.bld.operations.*;
import rife.bld.publish.*; import rife.bld.publish.*;
import rife.bld.wrapper.Wrapper;
import rife.tools.DirBuilder; import rife.tools.DirBuilder;
import rife.tools.FileUtils; import rife.tools.FileUtils;
@ -113,7 +112,14 @@ public class BldBuild extends AbstractRife2Build {
jar(); jar();
var tmp = Files.createTempDirectory("bld").toFile(); var tmp = Files.createTempDirectory("bld").toFile();
try { try {
new Wrapper().createWrapperFiles(path(tmp, "lib").toFile(), VersionNumber.UNKNOWN.toString()); new RunOperation()
.workDirectory(tmp)
.mainClass(Cli.class.getName())
.classpath(runClasspath())
.runOptions("upgrade")
.outputProcessor(s -> true)
.execute();
new DirBuilder(tmp, t -> { new DirBuilder(tmp, t -> {
t.dir("bld", b -> { t.dir("bld", b -> {
b.dir("bin", i -> { b.dir("bin", i -> {
@ -127,7 +133,7 @@ public class BldBuild extends AbstractRife2Build {
}); });
}); });
b.dir("lib", l -> { b.dir("lib", l -> {
l.file("bld-wrapper.jar", f -> f.move(path(tmp, "lib", "bld-wrapper.jar"))); l.file("bld-wrapper.jar", f -> f.move(path(tmp, "lib", "bld", "bld-wrapper.jar")));
}); });
}); });
t.dir("lib", l -> l.delete()); t.dir("lib", l -> l.delete());