diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2921e00..4041471 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true - name: Set up JDK 8 uses: actions/setup-java@v4 with: @@ -16,10 +19,19 @@ jobs: distribution: 'corretto' cache: gradle - name: Build with Makefile - run: make build && make test && make untested-zip + run: | + make info + make build + make test + make untested-zip + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: geequel-shell + path: out/geequel-shell.zip - name: Upload logs if: failure() uses: actions/upload-artifact@v4 with: - name: ${{ inputs.log-name || 'logs' }} - path: /home/runner/work/geequel-shell/geequel-shell/geequel-shell/build/reports/tests/test/ + name: logs + path: geequel-shell/build/reports/tests/test/ diff --git a/Makefile b/Makefile index f5cd179..923d442 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,12 @@ .DEFAULT: help .PHONY: help build clean zip run untested-zip test integration-test tyrekicking-test mutation-test install info -gitdescribe := $(shell git describe --tags --match [0-9]*) -lasttag := $(shell git describe --tags --match [0-9]* --abbrev=0) +gitdescribe := $(shell git describe --tags --match '[0-9]*' 2>/dev/null || echo 0.0.1-alpha) +gitafter := $(shell git describe --tags --match '[0-9]*' --all 2>/dev/null | perl -pe 'exit unless /-\d+-/;s<^tags/><>;s<^(?:\d+\.)+\d+-><>;s<-.*><>; s/^/modified-/ if /./') +lasttag := $(shell git describe --tags --match '[0-9]*' --abbrev=0 2>/dev/null || echo 0.0.1-alpha) version ?= $(lasttag) -versionlabel = $(shell echo ${version} | awk '{ sub("^[0-9]+.[0-9]+.[0-9]+-?", "", $$1); print }') +versionlabel = $(shell (echo ${version} | perl -pe 's/^\d+\.\d+\.\d+-?//'; echo ${gitafter}) | grep . | head -1) versionnumber = $(shell echo ${version} | awk '{ sub("-.*$$", "", $$1); print }') pkgversion ?= 1 diff --git a/build.gradle b/build.gradle index 5ba7837..d41537a 100644 --- a/build.gradle +++ b/build.gradle @@ -59,7 +59,7 @@ subprojects { } ext { - // Only match tags starting with a number to avoid ongdb-xxx changelog tags + // Only match tags starting with a number to avoid ongdb-xxx / geequel-xxx changelog tags gitVersion = 'git describe --tags --match [0-9]*'.execute([], project.rootDir).text.trim() if (project.hasProperty('buildVersion')) { @@ -71,7 +71,7 @@ ext { argparse4jVersion = '0.7.0' junitVersion = '4.12' evaluatorVersion = '3.5.14' - neo4jJavaDriverVersion = '1.7.5' + neo4jJavaDriverVersion = '1.7.6' findbugsVersion = '3.0.0' jansiVersion = '1.13' jlineVersion = '2.14.6' diff --git a/geequel-shell/src/dist/geequel-shell.bat b/geequel-shell/src/dist/geequel-shell.bat index e37fe37..bb53462 100755 --- a/geequel-shell/src/dist/geequel-shell.bat +++ b/geequel-shell/src/dist/geequel-shell.bat @@ -82,7 +82,7 @@ rem Get arguments from the 4NT Shell from JP Software set CMD_LINE_ARGS=%$ :execute -rem Setup the command line +rem Set up the command line SETLOCAL EnableDelayedExpansion SET GEEQUEL_SHELL_JAR= diff --git a/geequel-shell/src/main/java/org/neo4j/shell/ParameterMap.java b/geequel-shell/src/main/java/org/neo4j/shell/ParameterMap.java index 04e77ea..dd56ab1 100644 --- a/geequel-shell/src/main/java/org/neo4j/shell/ParameterMap.java +++ b/geequel-shell/src/main/java/org/neo4j/shell/ParameterMap.java @@ -26,7 +26,7 @@ import java.util.Map; /** - * An object which keeps named parameters and allows them them to be set/unset. + * An object which keeps named parameters and allows them to be set/unset. */ public interface ParameterMap { /** diff --git a/geequel-shell/src/main/java/org/neo4j/shell/commands/Help.java b/geequel-shell/src/main/java/org/neo4j/shell/commands/Help.java index 9007f07..8a22224 100644 --- a/geequel-shell/src/main/java/org/neo4j/shell/commands/Help.java +++ b/geequel-shell/src/main/java/org/neo4j/shell/commands/Help.java @@ -36,7 +36,7 @@ public class Help implements Command { public static final String COMMAND_NAME = ":help"; private final Logger logger; private final CommandHelper commandHelper; - public static String CYPHER_REFCARD_LINK = "https://neo4j.com/docs/developer-manual/current/cypher/"; + public static String CYPHER_REFCARD_LINK = "https://docs.graphfoundation.org/docs/category/query-language-docs"; public Help(@Nonnull final Logger shell, @Nonnull final CommandHelper commandHelper) { this.logger = shell; diff --git a/geequel-shell/src/test/java/org/neo4j/shell/MainTest.java b/geequel-shell/src/test/java/org/neo4j/shell/MainTest.java index 7fd1fca..37a8c36 100644 --- a/geequel-shell/src/test/java/org/neo4j/shell/MainTest.java +++ b/geequel-shell/src/test/java/org/neo4j/shell/MainTest.java @@ -399,7 +399,7 @@ public void printsVersionAndExits() { ArgumentCaptor argument = ArgumentCaptor.forClass(String.class); verify(printStream).println(argument.capture()); - assertTrue(argument.getValue().matches("Geequel-Shell ( \\d+\\.\\d+\\.\\d+.*)?")); + assertTrue(argument.getValue().matches("Geequel-Shell (\\d+\\.\\d+\\.\\d+.*)?")); } @Test diff --git a/geequel-shell/src/test/java/org/neo4j/shell/parser/ShellStatementParserTest.java b/geequel-shell/src/test/java/org/neo4j/shell/parser/ShellStatementParserTest.java index 368a154..3b3d7cc 100644 --- a/geequel-shell/src/test/java/org/neo4j/shell/parser/ShellStatementParserTest.java +++ b/geequel-shell/src/test/java/org/neo4j/shell/parser/ShellStatementParserTest.java @@ -378,7 +378,7 @@ public void quoteInComment() throws Exception { } @Test - public void quoteInBlockomment() throws Exception { + public void quoteInBlockComment() throws Exception { // when parser.parseMoreText("/* `;\n;*/\n;"); diff --git a/gradlew.bat b/gradlew.bat index f955316..185c172 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -61,7 +61,7 @@ if "x%~1" == "x" goto execute set CMD_LINE_ARGS=%* :execute -@rem Setup the command line +@rem Set up the command line set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar