Init-module is script which init your laminas module fast and cleary without any left move.
Ubuntu
To init one module
bash ./init-module.sh Unleash-Pipe CRM-604 "Description ticket" git@bitbucket.org:dev.lubinets/orm-super.git "project-name"
to init two and more modules
bash ./init-modules.sh
Linux Mint
To init one module
./init-module.sh Unleash-Pipe CRM-604 "Description ticket" git@bitbucket.org:dev.lubinets/orm-super.git "project-name"
to init two and more modules
./init-modules.sh
Description for cli params:
- module name
- ticket
- ticket's description
- git destination repository (repo for inited module to push new one module to module's remote repo)
- project name for package (project-name/do-something-laravel-module)
Tips:
- avoid word "module" in your module name (example-do-things-module-module)
- VCSP - version control system provider (git, bitbucet and ect)
Make that sctipt executable to execute that script:)
chmod u+x init-module.sh
For rename folders install rename command it isn't exsist on Ubuntu by default
sudo apt-get install -y rename
Need root right to create symbolic link create symbolik link to work with phpstorm-cli
ln -s "$(locate phpstorm.sh)" /usr/local/bin/phpstorm
- module directory: ~/PhpstormProjects
Add next environment to your shell configuration variable to provide your special configuration
- Bash: ~/.bashrc or ~/.bash_profile
- Zsh: ~/.zshrc
- Fish: ~/.config/fish/config.fish
echo "export VCSP_REPO_BASE_MODULE=git@github.com:devlubinets/laminas-primary-module.git" >> ~/.zshrc
echo "export VCSP_DEV_WORKSPACE=devlubinets" >> ~/.zshrc
echo "export VCSP_PROVIDER=git@github.com" >> ~/.zshrc
echo "export ROOT_MODULE_PATH=/home/ad/PhpstormProjects/module-name" >> ~/.zshrc
./init-module.sh: /bin/sh^M: bad interpreter: No such file or directory
Descriptions:
This error message usually occurs when a script was created on a Windows system and then transferred to a Unix-based system without properly converting the line endings.The "^M" character is a carriage return character that is used in Windows line endings. Unix-based systems use only the line feed character.To fix this error, you need to convert the line endings in the script from Windows-style (CRLF) to Unix-style (LF) using a text editor or a command-line utility such as dos2unix.
Solutions:
- sudo apt install dos2unix && dos2unix *.sh
- sed -i -e 's/\r$//' *.sh
- Add check to symbolic link
- Add check to installed PHPStorm
- Get path to module dir from Environment