Add secondary Infra repo path to Infra command

This commit is contained in:
Christer Warén 2024-11-23 06:43:00 +02:00
parent 42239ef54d
commit 0683a5a4eb
2 changed files with 14 additions and 4 deletions

View File

@ -5,10 +5,15 @@ wx-infra(){
wx-header "Infra" wx-header "Infra"
wx-restricted wx-restricted
INFRA_PATH="/home/cwchristerw/Desktop/Work in Progress/Programming/warengroup/infra"
case $USERNAME in case $USERNAME in
cwchristerw) cwchristerw)
if [[ -d "/home/cwchristerw/Desktop/Work in Progress/Programming/warengroup/infra" ]]
INFRA_PATH="/home/cwchristerw/Desktop/Work in Progress/Programming/warengroup/infra"
else
INFRA_PATH="~/.warengroup/infra"
git clone https://git.waren.io/warengroup-private/infra --config core.sshCommand="ssh -i ~/.ssh/keys/warengroup-legacy" "$INFRA_PATH"
fi
if [[ -z $1 ]] if [[ -z $1 ]]
then then
echo "Tag Required" echo "Tag Required"

9
wx
View File

@ -138,10 +138,15 @@ wx-infra(){
wx-header "Infra" wx-header "Infra"
wx-restricted wx-restricted
INFRA_PATH="/home/cwchristerw/Desktop/Work in Progress/Programming/warengroup/infra"
case $USERNAME in case $USERNAME in
cwchristerw) cwchristerw)
if [[ -d "/home/cwchristerw/Desktop/Work in Progress/Programming/warengroup/infra" ]]
INFRA_PATH="/home/cwchristerw/Desktop/Work in Progress/Programming/warengroup/infra"
else
INFRA_PATH="~/.warengroup/infra"
git clone https://git.waren.io/warengroup-private/infra --config core.sshCommand="ssh -i ~/.ssh/keys/warengroup-legacy" "$INFRA_PATH"
fi
if [[ -z $1 ]] if [[ -z $1 ]]
then then
echo "Tag Required" echo "Tag Required"