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

add support for armv7l (ignores armv6l) #705

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bhamail
Copy link

@bhamail bhamail commented Mar 15, 2018

Summary
Add support for armv7l (ignores armv6l) for "arm" architecture (as detected by Java system property "os.arch").

Related to issue #704
This PR adds support for installing node on armv7l on a Raspberry Pi.

On the LTS node download site: https://nodejs.org/dist/v8.10.0/
there are only two choices for "arm" versions of node ("aarch64" is a different case): armv6l and armv7l. This patch simply uses the newer v7 flavor.

Tests and Documentation

I ran the following test code on a raspberry pi to confirm the behavior produced valid node download URLs:

package com.github.eirslett.maven.plugins.frontend.lib;

public class PlatformTest
{
  public static void main(final String[] args) {
    final com.github.eirslett.maven.plugins.frontend.lib.Platform platform = Platform.guess();

    System.out.println("os.arch:" + System.getProperty("os.arch"));
    final Architecture architecture = Architecture.guess();
    System.out.println("Architecture.guess(): " + architecture);

    final String actual = platform.getNodeDownloadFilename("v8.10.0", false);
    System.out.println("Platform.getNodeDownloadFilename(): " + actual);
  }
}

The test output was:

os.arch:arm
Architecture.guess(): armv7l
Platform.getNodeDownloadFilename(): v8.10.0/node-v8.10.0-linux-armv7l.tar.gz

That output should produce a valid download URL from this page:

https://nodejs.org/dist/v8.10.0/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant