Update config
This commit is contained in:
@@ -8,7 +8,7 @@ get_repo_root() {
|
|||||||
else
|
else
|
||||||
# Fall back to script location for non-git repos
|
# Fall back to script location for non-git repos
|
||||||
local script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
local script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
cd "$script_dir/../.." && pwd
|
cd "$script_dir/../../.." && pwd
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ fi
|
|||||||
# to the script location so the workflow still functions in repositories that
|
# to the script location so the workflow still functions in repositories that
|
||||||
# were initialised with --no-git.
|
# were initialised with --no-git.
|
||||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
FALLBACK_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
FALLBACK_ROOT="$(cd "$SCRIPT_DIR/../../.." && pwd)"
|
||||||
if git rev-parse --show-toplevel >/dev/null 2>&1; then
|
if git rev-parse --show-toplevel >/dev/null 2>&1; then
|
||||||
REPO_ROOT=$(git rev-parse --show-toplevel)
|
REPO_ROOT=$(git rev-parse --show-toplevel)
|
||||||
HAS_GIT=true
|
HAS_GIT=true
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ function Get-RepoRoot {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Fall back to script location for non-git repos
|
# Fall back to script location for non-git repos
|
||||||
return (Resolve-Path (Join-Path $PSScriptRoot "../..")).Path
|
return (Resolve-Path (Join-Path $PSScriptRoot "../../..")).Path
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-CurrentBranch {
|
function Get-CurrentBranch {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ $featureDesc = ($FeatureDescription -join ' ').Trim()
|
|||||||
# Resolve repository root. Prefer git information when available, but fall back
|
# Resolve repository root. Prefer git information when available, but fall back
|
||||||
# to the script location so the workflow still functions in repositories that
|
# to the script location so the workflow still functions in repositories that
|
||||||
# were initialised with --no-git.
|
# were initialised with --no-git.
|
||||||
$fallbackRoot = (Resolve-Path (Join-Path $PSScriptRoot "../..")).Path
|
$fallbackRoot = (Resolve-Path (Join-Path $PSScriptRoot "../../..")).Path
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$repoRoot = git rev-parse --show-toplevel 2>$null
|
$repoRoot = git rev-parse --show-toplevel 2>$null
|
||||||
|
|||||||
Reference in New Issue
Block a user