Skip to content

Commit

Permalink
goci#882 Fix Ensembl version issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sajo-ebi committed Jan 10, 2023
1 parent a15beff commit c149453
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
import uk.ac.ebi.spot.goci.model.EnsemblReleaseJson;

import javax.validation.constraints.NotNull;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;

/**
* Created by Laurent on 22/09/15.
Expand Down Expand Up @@ -48,10 +51,14 @@ public int getReleaseVersion() throws EnsemblRestIOException {
try {
EnsemblReleaseJson ensemblReleaseJson = restTemplate.getForObject(url, EnsemblReleaseJson.class);
getLog().info("Querying " + url);
int[] releases = ensemblReleaseJson.getReleases();
Integer[] releases = ensemblReleaseJson.getReleases();


if (releases != null) {
if (releases.length == 1) {
List <Integer> rels = Arrays.asList(releases);
rels.sort(Comparator.reverseOrder());
//if (releases.length == 1) {
if(!rels.isEmpty()) {
currentEnsemblRelease = releases[0];
}
else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
@JsonIgnoreProperties(ignoreUnknown = true)
public class EnsemblReleaseJson {

private int[] releases;
private Integer[] releases;

public EnsemblReleaseJson() {

}

public int[] getReleases() {
public Integer[] getReleases() {
return releases;
}

public void setReleases(int[] releases) {
public void setReleases(Integer[] releases) {
this.releases = releases;
}
}
2 changes: 1 addition & 1 deletion software-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Ensure all branches ready for release are merged into dev / master


DEV_BRANCH='goci#383_Greater_Middle_Eastern_ancestry_category_is_not_imported'
DEV_BRANCH='goci#882f-fix-Ensembl-versioning-code'

MASTER_BRANCH='2.x-stable'

Expand Down

0 comments on commit c149453

Please sign in to comment.