Skip to content

Commit e374d83

Browse files
authored
Merge pull request #54 from browserstack/revert-51-LOC-1636_Alpine_binary
Revert "Detect Alpine linux and download specific binary"
2 parents ee546e3 + 9715483 commit e374d83

File tree

2 files changed

+3
-26
lines changed

2 files changed

+3
-26
lines changed

src/main/java/com/browserstack/local/Local.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ public class Local {
2222

2323
private LocalProcess proc = null;
2424

25-
// Current version of binding package, used for --source option of binary
26-
private final String packageVersion = "1.0.5";
2725
private final Map<String, String> parameters;
2826
private final Map<String, String> avoidValueParameters;
2927

@@ -141,9 +139,6 @@ private void makeCommand(Map<String, String> options, String opCode) {
141139
command.add("--key");
142140
command.add(options.get("key"));
143141

144-
command.add("--source");
145-
command.add("java-" + packageVersion);
146-
147142
for (Map.Entry<String, String> opt : options.entrySet()) {
148143
String parameter = opt.getKey().trim();
149144
if (IGNORE_KEYS.contains(parameter)) {

src/main/java/com/browserstack/local/LocalBinary.java

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
class LocalBinary {
1212

13-
private static final String BIN_URL = "https://bstack-local-prod.s3.amazonaws.com/";
13+
private static final String BIN_URL = "https://s3.amazonaws.com/browserStack/browserstack-local/";
1414

1515
private String httpPath;
1616

@@ -40,33 +40,15 @@ private void initialize() throws LocalException {
4040
} else if (osname.contains("mac") || osname.contains("darwin")) {
4141
binFileName = "BrowserStackLocal-darwin-x64";
4242
} else if (osname.contains("linux")) {
43-
if (isAlpine()) {
44-
binFileName = "BrowserStackLocal-alpine";
45-
} else {
46-
String arch = System.getProperty("os.arch");
47-
binFileName = "BrowserStackLocal-linux-" + (arch.contains("64") ? "x64" : "ia32");
48-
}
43+
String arch = System.getProperty("os.arch");
44+
binFileName = "BrowserStackLocal-linux-" + (arch.contains("64") ? "x64" : "ia32");
4945
} else {
5046
throw new LocalException("Failed to detect OS type");
5147
}
5248

5349
httpPath = BIN_URL + binFileName;
5450
}
5551

56-
private boolean isAlpine() {
57-
String[] cmd = { "/bin/sh", "-c", "grep -w \"NAME\" /etc/os-release" };
58-
boolean flag = false;
59-
60-
try {
61-
Process os = Runtime.getRuntime().exec(cmd);
62-
BufferedReader stdout = new BufferedReader(new InputStreamReader(os.getInputStream()));
63-
64-
flag = stdout.readLine().contains("Alpine");
65-
} finally {
66-
return flag;
67-
}
68-
}
69-
7052
private void checkBinary() throws LocalException{
7153
boolean binaryWorking = validateBinary();
7254

0 commit comments

Comments
 (0)