Oh my zsh plugin with scripts for Liferay development
https://github.com/git-guides/install-git
Download and install https://www.java.com/es/download/ Note: liferay-zsh.plugin.zsh is forcing change to java 1.8
In Mac
brew install ant
In Linux
https://snapcraft.io/install/ant/ubuntusudo apt update && sudo apt install snapd && sudo snap install ant --classic
https://github.com/ohmyzsh/ohmyzsh
https://cli.github.com/
In Mac
brew install gnu-sed
In Linux
Not needed in LinuxIn Linux
https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-20-04sudo apt update && sudo apt install nodejs && sudo apt install npm
Download in $PATH_TO_LIFERAY_MAIN
- Your personal fork of https://github.com/liferay/liferay-portal
- Your personal fork of https://github.com/liferay/liferay-portal-ee
- https://github.com/holatuwol/liferay-intellij
For that just enter in liferay-portal folder and run:
git remote add upstream https://github.com/liferay/liferay-portal.git
git remote add brianchandotcom https://github.com/brianchandotcom/liferay-portal.git
For that just enter in liferay-portal-ee folder and run:
git remote add upstream https://github.com/liferay/liferay-portal-ee.git
git remote add brianchandotcom https://github.com/brianchandotcom/liferay-portal-ee.git
In Mac
brew install python
In Linux
sudo apt update && sudo apt install python3
In Mac
Homebrew installs pip pointing to the Homebrew’d Python 3 for you.
In Linux
sudo apt install python3-pip
This is necessary if you want to update Jira from commands like gitSendTo
Install it with
sudo npm install -g jira-cli
Configure it with
sudo jira config
More info at https://www.npmjs.com/package/jira-cli
In Mac
Install it from here https://dev.mysql.com/downloads/file/?id=503070
Set same user and password you have in your .liferay-zsh.config file
In Linux
Install mySQL
sudo apt update && sudo apt upgrade && sudo apt install mysql-server
Configure mySQL
sudo mysql
Set same user and password you have in your .liferay-zsh.config file:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
Exit mysql
exit
In Mac
brew install coreutils
In Linux
sudo apt-get update -y && sudo apt-get install -y coreutils
In this section, we describe how to install liferay-zsh plugin for oh-my-zsh
As with any zsh plugin we need to create a specific structure to place our liferay-zsh plugin.
These are the steps we should follow:
- Create a custom folder to place your ZSH customizations. You can create this directory wherever you want and call it as you prefer. For instance MyCustomFolder inside user home
- Then create a directory called 'plugins' inside your custom directory.
- Enter into the plugins directory and do
gh repo clone david-gutierrez-mesa/liferay-zsh
Your file tree should look like this:
MyCustomFolder
└── plugins
└── liferay-zsh
└── liferay-zsh.plugin.zsh
Now we need to let oh-my-zsh know we have a new plugin. In order to fo that we should tell him where we placed our plugin and reference it.
For that we need to:
- Edit file ~/.zshrc
- Search for ZSH_CUSTOM
- Uncomment line that has ZSH_CUSTOM
- To change default value for your path. In our example this line is going to be:
ZSH_CUSTOM=/Users/dgutierrez/MyCustomFolder
- In the same file (~/.zshrc) we must search for plugins=
- Add liferay-zsh into the line that starts with plugins= .Example
plugins=(git bundler liferay-zsh)
- Save
You will find in the project a template file call .liferay-zsh.conf that you can copy in order to let liferay-zsh plugin know your users and paths.
Steps to follow:
- Move $ZSH_CUSTOM/plugins/liferay-zsh/.liferay-zsh.conf file to /Users/{youruser}/ folder
- Edit /Users/{youruser}/.liferay-zsh.conf and fill al the variables there.
Note: To generate a git hub token see https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token
From Liferay ZSH root directory ($ZSH_CUSTOM/plugins/liferay-zsh/) type:
pip install -r python-scripts/requirements.txt
Now that all the configuration is done you just need to reload zsh
- Reload zsh by typing 'zsh' in your terminal.
Now you are ready to use liferay-zsh plugin
The Liferay ZSH plugin is a set of functions you can call from your Oh My ZSH terminal that are helping you with your daily work inside Liferay.
In order to see all the available functions check functions folder.
To know how to use a function, use the -h parameter. Example:
gitSendTo -h
https://github.com/ohmyzsh/ohmyzsh/wiki/Customization#adding-a-new-plugin