Push branch; update ticket urls
This commit is contained in:
parent
517a2bd6ca
commit
2340af8c9d
4
g
4
g
@ -1,13 +1,15 @@
|
|||||||
#!/usr/bin/env ksh
|
#!/usr/bin/env ksh
|
||||||
if [[ $1 = "pc" || ( $1 = "pr" && $2 = "create" ) ]]
|
if [[ $1 = "pc" || ( $1 = "pr" && $2 = "create" ) ]]
|
||||||
then
|
then
|
||||||
|
remote=$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null | cut -d/ -f1)
|
||||||
|
git push --set-upstream ${remote:-origin} $(git branch --show-current)
|
||||||
tmp=$(mktemp /tmp/g.XXXXXXXXXXX.md)
|
tmp=$(mktemp /tmp/g.XXXXXXXXXXX.md)
|
||||||
if [[ -f ~/.g.template ]]
|
if [[ -f ~/.g.template ]]
|
||||||
then
|
then
|
||||||
lps=$(git show --pretty='format:%s' --no-patch | cut -d' ' -f1)
|
lps=$(git show --pretty='format:%s' --no-patch | cut -d' ' -f1)
|
||||||
if [[ ! -z $lps ]]
|
if [[ ! -z $lps ]]
|
||||||
then
|
then
|
||||||
url="https://issues.liferay.com/browse/"$lps
|
url="https://liferay.atlassian.net/browse/"$lps
|
||||||
sed -e "s/{lps}/$lps/g" -e "s,{url},$url," <~/.g.template >$tmp
|
sed -e "s/{lps}/$lps/g" -e "s,{url},$url," <~/.g.template >$tmp
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user