Skip to content

Commit

Permalink
[fIXUP]
Browse files Browse the repository at this point in the history
  • Loading branch information
HannesWell committed Apr 2, 2024
1 parent 1dd7b72 commit 375f657
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:

- name: Test native launcher and executable
env:
rt.equinox.binaries.loc: ${{ github.workspace }}/equinox.binaries
EQUINOX_BINARIES_LOC: ${{ github.workspace }}/equinox.binaries
run: mvn -B -pl org.eclipse.equinox:org.eclipse.equinox.launcher.tests -am verify

- name: Upload artifacts
Expand Down
3 changes: 3 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ pipeline {
}
}
stage('Build') {
environment {
EQUINOX_BINARIES_LOC = "$WORKSPACE/rt.equinox.binaries"
}
steps {
sh """
mvn clean verify --batch-mode --fail-at-end -Dmaven.repo.local=$WORKSPACE/.m2/repository \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ static void prepareLauncherSetup() throws Exception {
versions.load(in);
}
String launcherLibrary = "eclipse_" + versions.get("maj_ver") + versions.get("min_ver")
+ (os.contains("win") ? ".dll" : ".so");
+ (os.contains("win") ? ".dll" : ".so");
String launcherLibFile = "org.eclipse.equinox.launcher." + ws + "." + os + "." + arch + "/" + launcherLibrary;
Files.copy(binariesRoot.resolve(launcherLibFile),
Files.createDirectories(eclipseInstallationMockLocation.resolve("plugins/org.eclipse.equinox.launcher"))
Expand All @@ -134,16 +134,16 @@ static void prepareLauncherSetup() throws Exception {
}

private static Path findBinariesRoot(Path equinoxRepositoryPath) {
String binariesRootName = "rt.equinox.binaries.loc";
Optional<Path> binariesRepo = Optional
.ofNullable(System.getProperty(binariesRootName, System.getenv(binariesRootName))).map(Path::of);
String binariesLocationName = "EQUINOX_BINARIES_LOC"; // dots in variable names are not permitted in POSIX
Optional<Path> binariesRepo = Optional.ofNullable(System.getProperty(binariesLocationName))
.or(() -> Optional.ofNullable(System.getenv(binariesLocationName))).map(Path::of);
if (binariesRepo.isEmpty()) { // search for co-located repository with known names
binariesRepo = Stream.of("equinox.binaries", "rt.equinox.binaries")
.map(equinoxRepositoryPath::resolveSibling).filter(Files::isDirectory).findFirst();
}
return binariesRepo.orElseThrow(() -> new IllegalStateException(
"Location of equinox binaries could not be auto-detected and was not provided via the System.property or environment.variable '"
+ binariesRootName + "'."));
+ binariesLocationName + "'."));
}

private static void addProjectsClassFiles(JarOutputStream jar, Path classesFolder) throws IOException {
Expand Down

0 comments on commit 375f657

Please sign in to comment.