diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 96afdcee2f..cfba250b76 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -26,7 +26,7 @@ jobs: # Build the project and publish to Maven local - name: Publish to Maven local - run: ./gradlew publishToMavenLocal -x test -x javadoc -Pversion=${{ env.releaseVersion }} + run: ./gradlew publishToMavenLocal -x test -x javadoc -PbuildVersion=${{ env.releaseVersion }} # Clone the DiffBenchmark repository and run benchmarks - name: Clone DiffBenchmark repository and run benchmarks diff --git a/Dockerfile b/Dockerfile index e25db1f63f..96d7961da0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,9 +7,13 @@ ENV TZ=GMT COPY . /opt/refactoringminer/ -RUN /opt/refactoringminer/gradlew -x test -p /opt/refactoringminer build 2>/dev/null -RUN unzip /opt/refactoringminer/build/distributions/*.zip -d /opt/refactoringminer/build/distributions -RUN ln -s /opt/refactoringminer/build/distributions/RefactoringMiner-*/bin/RefactoringMiner /usr/bin/refactoringminer +RUN /opt/refactoringminer/gradlew -x test -p /opt/refactoringminer build -PbuildVersion=DockerBuild 2>/dev/null +RUN unzip /opt/refactoringminer/build/distributions/RefactoringMiner-DockerBuild.zip -d /opt/refactoringminer/build/distributions +RUN ln -s /opt/refactoringminer/build/distributions/RefactoringMiner-DockerBuild/bin/RefactoringMiner /usr/bin/refactoringminer ENV LANG C.UTF-8 EXPOSE 6789 + +RUN mkdir -p /diff/left /diff/right +WORKDIR /diff + #ENTRYPOINT ["refactoringminer"] diff --git a/build.gradle b/build.gradle index 9539b941f6..bd46141b9b 100644 --- a/build.gradle +++ b/build.gradle @@ -9,8 +9,8 @@ plugins { } group = "com.github.tsantalis" -def version = project.hasProperty('version') ? - project.version +version = project.hasProperty('buildVersion') ? + project.buildVersion : '3.0.4' applicationName = rootProject.name @@ -39,8 +39,8 @@ test { useJUnitPlatform() maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1 if (project.hasProperty('notoken')) { - exclude '**/GHRepositoryWrapperTest.java' - exclude '**/TestCommandLine.class' + exclude '**/GHRepositoryWrapperTest.*' + exclude '**/TestCommandLine.*' print 'Skipping tests that require a GitHub token' } } @@ -55,7 +55,7 @@ dependencies { implementation 'io.github.java-diff-utils:java-diff-utils:4.12' implementation 'com.github.gumtreediff:core:3.0.0' implementation 'com.github.gumtreediff:gen.jdt:3.0.0' - implementation "org.jcommander:jcommander:1.83" + implementation 'org.jcommander:jcommander:1.83' testImplementation 'junit:junit:4.13.2' testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.0' testImplementation 'org.junit.jupiter:junit-jupiter-params:5.10.0' diff --git a/src/main/java/gui/webdiff/WebDiffRunner.java b/src/main/java/gui/webdiff/WebDiffRunner.java index 9d283f923a..8bc2f0fa23 100644 --- a/src/main/java/gui/webdiff/WebDiffRunner.java +++ b/src/main/java/gui/webdiff/WebDiffRunner.java @@ -69,8 +69,8 @@ public ProjectASTDiff getProjectASTDIFF(WebDiffRunner runner) throws Exception { URLHelper.getPullRequestID(runner.url), timeout); case DIR -> new GitHistoryRefactoringMinerImpl().diffAtDirectories( - runner.src, - runner.dst); + runner.src.toAbsolutePath().normalize(), + runner.dst.toAbsolutePath().normalize()); case CLONED -> new GitHistoryRefactoringMinerImpl().diffAtCommit( runner.repo, runner.commit,