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
|
begin # Git Flow
|
||||||
set -l dir (mktemp -d)
|
set -l dir (mktemp -d)
|
||||||
|
|
||||||
pushd "$dir" > /dev/null
|
|
||||||
begin
|
begin
|
||||||
set -l key "$root.git.flow"
|
set -l key "$root.git.flow"
|
||||||
set -l mainKey "$key.mainBranch"
|
set -l mainKey "$key.mainBranch"
|
||||||
set -l devKey "$key.devBranch"
|
set -l devKey "$key.devBranch"
|
||||||
|
|
||||||
git init
|
git -C "$dir" init
|
||||||
git commit --allow-empty -m "Initial commit" > /dev/null
|
git -C "$dir" commit --allow-empty -m "Initial commit" > /dev/null
|
||||||
git branch master || true &> /dev/null
|
git -C "$dir" branch master || true &> /dev/null
|
||||||
git branch main || true &> /dev/null
|
git -C "$dir" branch main || true &> /dev/null
|
||||||
git branch dev || true &> /dev/null
|
git -C "$dir" branch dev || true &> /dev/null
|
||||||
yes "" | git flow init &> /dev/null
|
yes "" | git -C "$dir" flow init &> /dev/null
|
||||||
|
|
||||||
if isSet "$mainKey"
|
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
|
else
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
if isSet "$devKey"
|
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
|
else
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
popd > /dev/null
|
|
||||||
|
|
||||||
rm -rf "$dir"
|
rm -rf "$dir"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue