liferay / liferay-cli

Apache License 2.0
4 stars 5 forks source link

liferay - Liferay Client Extension Control CLI

Tool for performing Liferay Client Extension related operations from the command line.

Manuall Installation

Manuall Installation On MacOS using curl

  1. Download the binary using curl
    1. Apple Silicon
      curl -fsSL https://github.com/liferay/liferay-cli/releases/latest/download/liferay-darwin-arm64 -O
    2. Intel
      curl -fsSL https://github.com/liferay/liferay-cli/releases/latest/download/liferay-darwin-amd64 -O
  2. Validate the binary (optional) Download the checksum file
    curl -fsSL https://github.com/liferay/liferay-cli/releases/latest/download/checksums.txt -o checksum.txt

    Validate the binary against the checksum file

    1. Apple Silicon
      shasum -c <(grep liferay-darwin-arm64 checksum.txt)
    2. Intel
      shasum -c <(grep liferay-darwin-amd64 checksum.txt)

      If valid, the output is:

      <binary>: OK

      If the check fails, shasum exits with nonzero status and prints output similar to:

      <binary>: FAILED
      shasum: WARNING: 1 computed checksum did NOT match
  3. Make the binary executable.
    chmod +x ./liferay-darwin-*
  4. Move the binary to a file location on your system PATH and rename it to liferay for convenience.
    sudo mv ./liferay-darwin-* /usr/local/bin/liferay
    sudo chown root: /usr/local/bin/liferay

    Make sure /usr/local/bin is in your PATH environment variable.

  5. Test to ensure the version you installed is up-to-date:
    liferay --version

Manuall Installation On Linux using curl

Known Issues

  1. Download the binary using curl
    curl -fsSL https://github.com/liferay/liferay-cli/releases/latest/download/liferay-linux-amd64 -O
  2. Validate the binary (optional) Download the checksum file
    curl -fsSL https://github.com/liferay/liferay-cli/releases/latest/download/checksums.txt -o checksum.txt

    Validate the binary against the checksum file

    shasum -c <(grep liferay-linux-amd64 checksum.txt)

    If valid, the output is:

    <binary>: OK

    If the check fails, shasum exits with nonzero status and prints output similar to:

    <binary>: FAILED
    shasum: WARNING: 1 computed checksum did NOT match
  3. Make the binary executable.
    chmod +x ./liferay-linux-amd64
  4. Move the binary to a file location on your system PATH and rename it to liferay for convenience.
    sudo mv ./liferay-linux-amd64 /usr/local/bin/liferay
    sudo chown root: /usr/local/bin/liferay

    Make sure /usr/local/bin is in your PATH environment variable.

  5. Test to ensure the version you installed is up-to-date:
    liferay --version

Manuall Installation On Windows using curl

  1. Download the binary using curl
    1. ARM
      curl.exe -fsSL "https://github.com/liferay/liferay-cli/releases/latest/download/liferay-windows-arm64.exe" -O
    2. Intel
      curl.exe -fsSL "https://github.com/liferay/liferay-cli/releases/latest/download/liferay-windows-amd64.exe" -O
  2. Validate the binary (optional) Download the checksum file
    curl -fsSL https://github.com/liferay/liferay-cli/releases/latest/download/checksums.txt -o checksum.txt

    Validate the binary against the checksum file

    1. Using Command Prompt to manually compare CertUtil's output to the checksum file downloaded:
      1. ARM
        CertUtil -hashfile liferay-windows-arm64.exe SHA256
        findstr liferay-windows-arm64.exe checksum.txt
      2. Intel
        CertUtil -hashfile liferay-windows-amd64.exe SHA256
        findstr liferay-windows-amd64.exe checksum.txt
  3. Rename it to liferay for convenience and move the binary to a location which can be added to your system PATH.
    1. ARM
      ren "liferay-windows-arm64.exe" "liferay.exe" & move /Y "liferay.exe" "%USERPROFILE%\AppData\Local\Programs\Common"
    2. Intel
      ren "liferay-windows-amd64.exe" "liferay.exe" & move /Y "liferay.exe" "%USERPROFILE%\AppData\Local\Programs\Common"
  4. Add %USERPROFILE%\AppData\Local\Programs\Common to your PATH system variable.
    1. Press the Windows key and type env.
    2. In the result pane select Edit the system environment variables to open the System Properites widget.
    3. Click |Environment Variables...| button.
    4. Under User variables for %user% click the Path entry and select |Edit|.
    5. Click |New| and paste %USERPROFILE%\AppData\Local\Programs\Common
    6. Click |OK| and close all the windows.
    7. Logout and back in.
  5. Test to ensure the version you installed is up-to-date open a terminal and execute:
    liferay --version

Automated Installation

Installation on Mac or Linux using the install.sh script

See Known Issues above for some issues with Linux.

  1. Execute:
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/liferay/liferay-cli/HEAD/install.sh)"
  2. Test to ensure the version you installed is up-to-date open a terminal and execute:
    liferay --version

Run Prerequisites

Getting Started / Onboarding steps

We have a new Getting Started guide available here.

Advanced: How to customize the DXP Image used in localdev

Getting productive with Tilt

Cleanup liferay/cli