Skip to content

Commit 6d344f2

Browse files
new version
1 parent 8435ed0 commit 6d344f2

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

codebase-v0004.jar

18.4 KB
Binary file not shown.

src/de/paull/lib/output/Output.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public Output(boolean debug, String log, String err, String packageName) {
3636
ERR_FILE_PATH = err;
3737
defStream = System.out;
3838
fileStream = getFileStream(log);
39-
newStream = new Stream(this);
39+
newStream = new Stream(this, packageName);
4040
System.setOut(newStream);
4141
new ErrorStream(this);
4242
}
@@ -83,10 +83,10 @@ public class Stream extends PrintStream {
8383
private final String name; // Package name, like 'de.paull'
8484
private final String notname;
8585

86-
public Stream(OutputStream out) {
86+
public Stream(OutputStream out, String name) {
8787
super(out, true);
8888
hasLB = true;
89-
name = "de.paull";
89+
this.name = name;
9090
notname = "de.paull.lib.output";
9191
}
9292

version/Main.kt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import java.io.File
22

3+
34
fun main() {
45
val VERSION_FILE = "VERSION.txt"
56

@@ -8,6 +9,8 @@ fun main() {
89
val text = file.readText().trim()
910
val num = "%04d".format(text.toInt() + 1)
1011

12+
removeOld()
13+
1114
val old = File("../codebase.jar")
1215
val new = File("../codebase-v$num.jar")
1316
old.renameTo(new)
@@ -16,3 +19,11 @@ fun main() {
1619

1720
println("done, new codebase compiled to codebase-v$num.jar")
1821
}
22+
23+
fun removeOld() {
24+
val dir = File("../")
25+
val listOfFiles: Array<File> = dir.listFiles()
26+
for (f: File in listOfFiles)
27+
if (f.isFile() && f.name.startsWith("codebase-v"))
28+
f.delete()
29+
}

version/VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0001
1+
0004

0 commit comments

Comments
 (0)