Archived on 2020-02-16
I recently switched jobs away from SAP Commerce development
When working with SAP Commerce, you have to execute most of the interesting
commands like ant
or hybrisserver.sh
in the hybris/bin/platform
directory.
This little wrapper takes care of the navigation, regardless in what folder of the
project you are, and also sources setantenv.sh
, if necessary
You current working dir is not modified, so you can fire any command without loosing you current context.
- Clone or download this repo
chmod u+x ybp
(Linux / macOS only)- put
ybp
/ybp.bat
somehwere on yourPATH
- Never type
cd ../../../hybris/bin/platform
orsource setantenv.sh
/setantenv.bat
again
cd myproject/hybris/bin/custom/myextension/some/sub/folder
ybp ant clean all
# run ant clean all for the whole platform
ybp ./hybrisserver.sh debug
# start server
For maximum laziness developer efficiency, I recommend following aliases:
alias ya='ybp ant'
alias ys='ybp ./hybrisserver.sh'