Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace version parsing and handling with SemVer4j library #1

Open
wants to merge 2 commits into
base: mck/16649
Choose a base branch
from

Conversation

michaelsembwever
Copy link
Member

@michaelsembwever michaelsembwever commented May 15, 2021

fyi @ifesdjeen

Two commits:

  • first commit puts tests into place
  • second commit switches out the impl to use SemVer4j

@michaelsembwever
Copy link
Member Author

(taking this to completion, with the Semver class as part of the API, can be seen in #2 )

@ifesdjeen
Copy link

I would create files by hand during tests rather than storing them in repository, maybe something like:

    public static String[] versions = new String[] {
            "2.2.12",
            "2.2.2",
            "3.0.0",
            "3.0.10",
            "3.11.10",
            "3.11.9",
            "4.0-alpha1",
            "4.0-beta1",
            "4.0-rc1",
            "4.0.0",
            "4.1.0"
    };

    @Test
    public void testVersions() throws IOException {
        Path root = Files.createTempDirectory("versions");

        for (String version : versions) {
            Files.createFile(Paths.get(root.toAbsolutePath().toString(),
                    "dtest-" + version + ".jar"));
        }

        Versions versions = Versions.find(root.toAbsolutePath().toString());
    }

+1 otherwise

@michaelsembwever
Copy link
Member Author

michaelsembwever commented Jun 18, 2021

I would create files by hand during tests rather than storing them in repository, maybe something like:

yeah, bang on good idea, will do…

EDIT: done.

 - fixes pattern
 - handles non-existant build directory
 - reduces some method visibilities
 - adds dummy jar files for testing against
 patch by Mick Semb Wever; reviewed by XXX for XXX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants