Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composer Tools #6

Draft
wants to merge 6 commits into
base: develop
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions aliases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ alias git-current-commit='git rev-parse --verify --short HEAD';
alias git-current-tag='git fetch --tags --force --quiet && git describe --tags 2> /dev/null';
alias git-reset='git reset --hard origin/$(git-current-branch)';
alias git-clean-local-branches='git fetch --quiet && git branch -vv | grep -v "^\*" | grep "\[.*: gone\]" | cut -d " " -f 3 | xargs git branch --delete';

alias package-version='function _composer_package_version { parts=($(echo ${1%/} | tr "/" "\n")); if [[ 2 -le $#parts ]]; then vendor="${parts[-2]}/"; else vendor=''; fi; package="$vendor${parts[-1]}"; grep "\"name\": \".*$package\"" -A 5 composer.lock; }; _composer_package_version';
alias composer-ulm='php -d memory_limit=-1 $(which composer)';