From 690b1469dad5eb300c8ee5323f32b9b192064408 Mon Sep 17 00:00:00 2001 From: Dmitry Isaenko Date: Mon, 18 Jul 2022 23:08:25 +0300 Subject: [PATCH] Add Drone, remove malware Jenkins --- .drone.yml | 29 +++++++++++++++++++ Jenkinsfile | 21 -------------- pom.xml | 3 ++ .../konogonka/Tools/RomFs/Level6Header.java | 4 +++ 4 files changed, 36 insertions(+), 21 deletions(-) create mode 100644 .drone.yml delete mode 100644 Jenkinsfile diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..40ffbfa --- /dev/null +++ b/.drone.yml @@ -0,0 +1,29 @@ +kind: pipeline +type: docker +name: default + +steps: + - name: test + image: maven:3-jdk-11 + commands: + - mvn -B -DskipTests clean package + volumes: + - name: m2 + path: /root/.m2 + + - name: archive-artifact + image: alpine:latest + commands: + - mkdir -p /builds/konogonka + - cp target/konogonka-*jar /builds/konogonka/ + volumes: + - name: builds + path: /builds + +volumes: + - name: m2 + host: + path: /home/docker/drone/files/m2 + - name: builds + host: + path: /home/www/builds \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index 893070c..0000000 --- a/Jenkinsfile +++ /dev/null @@ -1,21 +0,0 @@ -pipeline { - agent { - docker { - image 'maven:3-jdk-11' - args '-v /home/docker/jenkins/files/m2:/root/.m2' - } - } - - stages { - stage('Build') { - steps { - sh 'mvn -B -DskipTests clean package' - } - } - } - post { - always { - archiveArtifacts artifacts: 'target/*-jar-with-dependencies.jar', onlyIfSuccessful: true - } - } -} \ No newline at end of file diff --git a/pom.xml b/pom.xml index fa5f880..0b7b6a1 100644 --- a/pom.xml +++ b/pom.xml @@ -42,6 +42,7 @@ UTF-8 + yyyyMMdd.HHmmss @@ -164,6 +165,7 @@ --> + ${project.artifactId}-${project.version}-${maven.build.timestamp} org.apache.maven.plugins @@ -199,6 +201,7 @@ jar-with-dependencies + false diff --git a/src/main/java/konogonka/Tools/RomFs/Level6Header.java b/src/main/java/konogonka/Tools/RomFs/Level6Header.java index 4efaf73..65e13e1 100644 --- a/src/main/java/konogonka/Tools/RomFs/Level6Header.java +++ b/src/main/java/konogonka/Tools/RomFs/Level6Header.java @@ -22,6 +22,8 @@ package konogonka.Tools.RomFs; import konogonka.LoperConverter; import konogonka.RainbowDump; +import java.util.Arrays; + public class Level6Header { private long headerLength; private long directoryHashTableOffset; @@ -43,6 +45,7 @@ public class Level6Header { throw new Exception("Level 6 Header section is too small"); headerLength = getNext(); directoryHashTableOffset = getNext(); + directoryHashTableOffset <<= 32; directoryHashTableLength = getNext(); directoryMetadataTableOffset = getNext(); directoryMetadataTableLength = getNext(); @@ -51,6 +54,7 @@ public class Level6Header { fileMetadataTableOffset = getNext(); fileMetadataTableLength = getNext(); fileDataOffset = getNext(); + RainbowDump.hexDumpUTF8(Arrays.copyOfRange(headerBytes, 0, 0x50)); } private long getNext(){