Skip to content

Commit

Permalink
ARM support for NodeJS
Browse files Browse the repository at this point in the history
  • Loading branch information
mlarraz committed Sep 10, 2024
1 parent 5fc5709 commit 62bb5e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
7 changes: 1 addition & 6 deletions lib/language_pack/helpers/node_installer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def initialize
end

def binary_path
node_folder(@version)
File.basename(@url).delete_suffix(".tar.gz")
end

def install
Expand All @@ -27,9 +27,4 @@ def install
FileUtils.mv("#{dir}/#{node_bin}", ".")
end
end

private
def node_folder(version)
"node-v#{version}-linux-x64"
end
end
3 changes: 2 additions & 1 deletion lib/language_pack/helpers/nodebin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
class LanguagePack::Helpers::Nodebin
NODE_VERSION = "20.9.0"
YARN_VERSION = "1.22.19"
ARCH = RUBY_PLATFORM.start_with?(/aarch64|arm64/) ? "arm64" : "x64"

def self.hardcoded_node_lts
{
"number" => NODE_VERSION,
"url" => "https://heroku-nodebin.s3.us-east-1.amazonaws.com/node/release/linux-x64/node-v#{NODE_VERSION}-linux-x64.tar.gz"
"url" => "https://nodejs.org/download/release/v#{NODE_VERSION}/node-v#{NODE_VERSION}-linux-#{ARCH}.tar.gz",
}
end

Expand Down

0 comments on commit 62bb5e6

Please sign in to comment.