A collection of shortcuts for most common actions during Liferay product development. I do this for fun and for messing around with Commander
, but it also allows me have to remember less stuff.
lrp build
is just an alias that executes the ant all
command needed for building all modules of the portal. Used almost every day.
lrp clean
is an abstraction of a git clean
complex command that removes all files created in the local repository. Used when unexpected behaviours occur, rarely.
lrp deploy
is an abstraction for a gradle
task that builds the module where executed. Used intensively 😅
- Use
-a
option to use a fast deploy without installing dependencies. - Use
-w
option for watching for changes. - Use
-s
option for using the Liferay Super Deploy script, which builds all changes modules at once. This option depends on this other script. Credits to @4lejandrito 🙌
lrp format
is an abstraction for a gradle
task that performs a formatter to the source code of the module where executed. Used often.
lrp morning
is a convenience group of commands executed almost daily. It stops the portal if running, updates the upstream and origin code, restores the SQL database and run the portal again. Used daily.
lrp pr
is an abstraction above Github CLI pull request command. It allows to get or send pull request from and to any fork of the Liferay Portal. Used almost daily.
lrp pr get liferay-tango 2222
where liferay-tango is the name of the repo where the pr is, and 2222 is the id of the pr.lrp pr post liferay-tango
will place a new pr in the mentioned repo
lrp restore-sql
is an abstraction for a more complex command which deletes and creates a new sql database for the portal with the default configs, deleting some temporary data on the fly. Used daily.
lrp start
is an abstraction of the catalina command that runs the tomcat server and starts the Liferay Portal. Used intensively 😅
lrp stop
stops the tomcat server killing the process. Used intensively 😅
lrp update-repo
groups some common git commands for convenience: checkout to master branch, rebase from upstream/master and push to origin/master. Used daily.
Do you want to use this commands in you local environment?
- Clone this repo
- Install dependencies:
yarn
ornpm i
- Under
./config.js
- add your path to the Liferay Portal main folder in
portalPath
var - modify the Tomcat version, if needed, in
tomcatVersion
var
- add your path to the Liferay Portal main folder in
- Reload the terminal session and run
lrp -V
orlrp -h
to verify everything is OK.