Skip to content

Commit

Permalink
Build: fix the Elasticsearch download URL so it works on Linux (#725)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexklibisz authored Aug 29, 2024
1 parent c22b52a commit 923fb22
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions project/ElasticsearchPluginPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import java.util.zip.GZIPInputStream
import scala.sys.process.Process

/** SBT plugin providing functionality to run and build an Elasticsearch plugin. Also see:
* https://github.com/elastic/elasticsearch/blob/7ad3cf0d34/build-tools/src/main/java/org/elasticsearch/gradle/plugin/PluginBuildPlugin.java,
* build.sbt file in https://github.com/shikhar/eskka
*/
* https://github.com/elastic/elasticsearch/blob/7ad3cf0d34/build-tools/src/main/java/org/elasticsearch/gradle/plugin/PluginBuildPlugin.java,
* build.sbt file in https://github.com/shikhar/eskka
*/
object ElasticsearchPluginPlugin extends AutoPlugin {

override val trigger = noTrigger
Expand Down Expand Up @@ -132,7 +132,7 @@ object ElasticsearchPluginPlugin extends AutoPlugin {
val log = sLog.value
val elasticsearchVersionSuffix = {
val osName = System.getProperty("os.name").toLowerCase()
val arch = System.getProperty("os.arch")
val arch = if (System.getProperty("os.arch") == "amd64") "x86_64" else System.getProperty("os.arch")
if (osName.contains("mac")) s"darwin-$arch"
else if (osName.contains("nix") || osName.contains("nux")) s"linux-$arch"
else throw new RuntimeException(s"Unsupported operating system $osName, $arch")
Expand Down

0 comments on commit 923fb22

Please sign in to comment.