Skip to content

Commit

Permalink
Merge pull request #94 from opencb/TASK-6780
Browse files Browse the repository at this point in the history
TASK-6780 - Port Patch 5.2.1 -> 6.0.0 - Xetabase 2.2.1 -> 3.0.0
  • Loading branch information
juanfeSanahuja authored Oct 14, 2024
2 parents 853f3b8 + f40fe21 commit f2d8430
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 54 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,7 @@ jobs:
build:
uses: ./.github/workflows/build-java-app-workflow.yml

test:
uses: ./.github/workflows/test-analysis.yml
needs: build
secrets: inherit

deploy-maven:
uses: ./.github/workflows/deploy-maven-repository-workflow.yml
needs: test
needs: build
secrets: inherit
1 change: 1 addition & 0 deletions .github/workflows/scripts/get-xetabase-branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ get_xetabase_branch() {

# Check if the branch name starts with "release-" and follows the patterns "release-a.x.x" or "release-a.b.x"
if [[ "$input_branch" =~ ^release-([0-9]+)\.x\.x$ ]] || [[ "$input_branch" =~ ^release-([0-9]+)\.([0-9]+)\.x$ ]]; then

# Extract the MAJOR part of the branch name
MAJOR=${BASH_REMATCH[1]}
# Calculate the XETABASE_MAJOR by subtracting 3 from MAJOR
Expand Down
48 changes: 0 additions & 48 deletions .github/workflows/tmp-test-xetabase-branch.yml

This file was deleted.

7 changes: 7 additions & 0 deletions commons-lib/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.8.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
22 changes: 22 additions & 0 deletions commons-lib/src/main/java/org/opencb/commons/utils/FileUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import org.apache.commons.lang3.StringUtils;
import org.opencb.commons.exec.Command;
import org.slf4j.LoggerFactory;

import java.io.*;
import java.nio.charset.Charset;
Expand Down Expand Up @@ -188,6 +189,27 @@ public static String[] getUserAndGroup(Path path, boolean numericId) throws IOEx
return new String[]{split[2], split[3]};
}


public static void copyFile(File src, File dest) throws IOException {
try {
org.apache.commons.io.FileUtils.copyFile(src, dest);
} catch (IOException e) {
try {
if (src.length() == dest.length()) {
LoggerFactory.getLogger(FileUtils.class).warn(e.getMessage());
return;
}
throw e;
} catch (Exception e1) {
throw e;
}
}
}

//-------------------------------------------------------------------------
// P R I V A T E M E T H O D S
//-------------------------------------------------------------------------

private static String getLsOutput(Path path, boolean numericId) throws IOException {
FileUtils.checkPath(path);

Expand Down

0 comments on commit f2d8430

Please sign in to comment.