Skip to content

Commit

Permalink
Add NIX and OSX support for 8.0.18 wix-incubator#185
Browse files Browse the repository at this point in the history
  • Loading branch information
EzequielB committed Jun 15, 2020
1 parent b6ffb83 commit 643808d
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ public class FileSet {
new Nix57FileSetEmitter(),
new Nix57_18_AndUpFileSetEmitter(),
new Nix8FileSetEmitter(),
new OSX8FileSetEmitter());
new Nix80_18FileSetEmitter(),
new OSX8FileSetEmitter(),
new OSX80_18FileSetEmitter());

public static de.flapdoodle.embed.process.config.store.FileSet emit(
final Platform platform,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ public enum Version implements IVersion {
v5_7_latest(v5_7_27),
v8_0_11("8.0", 11, MacOsVersion.v10_13),
v8_0_17("8.0", 17, MacOsVersion.v10_14, TXZ, Platform.Linux, Platform.Windows, Platform.OS_X),
v8_latest(v8_0_17);
v8_0_18("8.0", 18, MacOsVersion.v10_14, TXZ, Platform.Linux, Platform.OS_X),
v8_latest(v8_0_18);

private enum MacOsVersion {
v10_6("osx"),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package com.wix.mysql.distribution.fileset;

import com.wix.mysql.distribution.Version;
import de.flapdoodle.embed.process.config.store.FileSet;
import de.flapdoodle.embed.process.config.store.FileType;
import de.flapdoodle.embed.process.distribution.Platform;

import java.util.Objects;

import static de.flapdoodle.embed.process.config.store.FileType.Executable;
import static de.flapdoodle.embed.process.config.store.FileType.Library;
import static de.flapdoodle.embed.process.distribution.Platform.OS_X;

public class Nix80_18FileSetEmitter extends Nix implements FileSetEmitter {
@Override
public boolean matches(Platform platform, Version version) {
return platform.isUnixLike() && (Platform.detect() != OS_X)
&& Objects.equals(version.getMajorVersion(), "8.0")
&& version.getMinorVersion() > 17;
}

@Override
public FileSet emit() {
return FileSet.builder()
.addEntry(Executable, "bin/mysqld")
.addEntry(Library, "bin/mysql")
.addEntry(Library, "bin/mysqladmin")
.addEntry(Library, "bin/my_print_defaults")
.addEntry(Library, "share/english/errmsg.sys")
.addEntry(Library, "lib/libssl.so.1.1")
.addEntry(Library, "lib/libcrypto.so.1.1")
.addEntry(Library, "lib/private/protobuf-lite.so.3.6.1")
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ public class Nix8FileSetEmitter extends Nix implements FileSetEmitter {
@Override
public boolean matches(Platform platform, Version version) {
return platform.isUnixLike() && (Platform.detect() != OS_X)
&& Objects.equals(version.getMajorVersion(), "8.0");
&& Objects.equals(version.getMajorVersion(), "8.0")
&& version.getMinorVersion() <= 17;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package com.wix.mysql.distribution.fileset;

import com.wix.mysql.distribution.Version;
import de.flapdoodle.embed.process.config.store.FileSet;
import de.flapdoodle.embed.process.distribution.Platform;

import java.util.Objects;

import static de.flapdoodle.embed.process.config.store.FileType.Executable;
import static de.flapdoodle.embed.process.config.store.FileType.Library;
import static de.flapdoodle.embed.process.distribution.Platform.OS_X;

public class OSX80_18FileSetEmitter extends Nix implements FileSetEmitter {
@Override
public boolean matches(Platform platform, Version version) {
return (Platform.detect() == OS_X)
&& Objects.equals(version.getMajorVersion(), "8.0")
&& version.getMinorVersion() > 17;
}

@Override
public FileSet emit() {
return FileSet.builder()
.addEntry(Executable, "bin/mysqld")
.addEntry(Library, "bin/mysql")
.addEntry(Library, "bin/mysqladmin")
.addEntry(Library, "bin/my_print_defaults")
.addEntry(Library, "share/english/errmsg.sys")
.addEntry(Library, "lib/libssl.1.1.dylib")
.addEntry(Library, "lib/libcrypto.1.1.dylib")
.addEntry(Library, "lib/libprotobuf-lite.3.6.1.dylib")
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
public class OSX8FileSetEmitter extends Nix implements FileSetEmitter {
@Override
public boolean matches(Platform platform, Version version) {
return (Platform.detect() == OS_X) && Objects.equals(version.getMajorVersion(), "8.0");
return (Platform.detect() == OS_X)
&& Objects.equals(version.getMajorVersion(), "8.0")
&& version.getMinorVersion() <= 17;
}

@Override
Expand Down

0 comments on commit 643808d

Please sign in to comment.