Prevent changing the working directory
This commit is contained in:
parent
3a4c2891ad
commit
66927e65d0
1 changed files with 8 additions and 10 deletions
|
@ -41,32 +41,30 @@ begin
|
|||
begin # Git Flow
|
||||
set -l dir (mktemp -d)
|
||||
|
||||
pushd "$dir" > /dev/null
|
||||
begin
|
||||
set -l key "$root.git.flow"
|
||||
set -l mainKey "$key.mainBranch"
|
||||
set -l devKey "$key.devBranch"
|
||||
|
||||
git init
|
||||
git commit --allow-empty -m "Initial commit" > /dev/null
|
||||
git branch master || true &> /dev/null
|
||||
git branch main || true &> /dev/null
|
||||
git branch dev || true &> /dev/null
|
||||
yes "" | git flow init &> /dev/null
|
||||
git -C "$dir" init
|
||||
git -C "$dir" commit --allow-empty -m "Initial commit" > /dev/null
|
||||
git -C "$dir" branch master || true &> /dev/null
|
||||
git -C "$dir" branch main || true &> /dev/null
|
||||
git -C "$dir" branch dev || true &> /dev/null
|
||||
yes "" | git -C "$dir" flow init &> /dev/null
|
||||
|
||||
if isSet "$mainKey"
|
||||
sudo git flow config set $configArgs master (getConfig "$mainKey") > /dev/null
|
||||
sudo git -C "$dir" flow config set $configArgs master (getConfig "$mainKey") > /dev/null
|
||||
else
|
||||
true
|
||||
end
|
||||
|
||||
if isSet "$devKey"
|
||||
sudo git flow config set $configArgs develop (getConfig "$devKey") > /dev/null
|
||||
sudo git -C "$dir" flow config set $configArgs develop (getConfig "$devKey") > /dev/null
|
||||
else
|
||||
true
|
||||
end
|
||||
end
|
||||
popd > /dev/null
|
||||
|
||||
rm -rf "$dir"
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue