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

Build: fix the Elasticsearch download URL so it works on Linux #725

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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