tests/copy-src: always copy .git dir
This is required by a later commit that introduces flakes-based test evaluation. Evaluating local flakes needs a repo dir.
This commit is contained in:
parent
f405a2ceda
commit
e2d653e7cb
@ -14,7 +14,7 @@ atExit() {
|
||||
trap "atExit" EXIT
|
||||
|
||||
# shellcheck disable=SC2154
|
||||
rsync -a --delete --exclude='.git*' "$scriptDir/../" "$tmp/src"
|
||||
rsync -a --delete "$scriptDir/../" "$tmp/src"
|
||||
echo "Copied src"
|
||||
|
||||
# shellcheck disable=SC2154
|
||||
|
@ -1,15 +0,0 @@
|
||||
# Create and maintain a minimal git repo at the root of the copied src
|
||||
(
|
||||
# shellcheck disable=SC2154,SC2164
|
||||
cd "$scriptDir/.."
|
||||
amend=(--amend)
|
||||
|
||||
if [[ ! -e .git ]] || ! git rev-parse HEAD 2>/dev/null; then
|
||||
git init
|
||||
amend=()
|
||||
fi
|
||||
git add .
|
||||
if ! git diff --quiet --cached; then
|
||||
git commit -a "${amend[@]}" -m -
|
||||
fi
|
||||
) >/dev/null
|
@ -277,11 +277,6 @@ flake() {
|
||||
nixosSearch() {
|
||||
if ! checkFlakeSupport "nixosSearch"; then return; fi
|
||||
|
||||
if [[ $_nixBitcoinInCopiedSrc ]]; then
|
||||
# flake-info requires that its target flake is under version control
|
||||
. "$scriptDir/lib/create-git-repo.sh"
|
||||
fi
|
||||
|
||||
if [[ $outLinkPrefix ]]; then
|
||||
# Add gcroots for flake-info
|
||||
nix build "$scriptDir/nixos-search#flake-info" -o "$outLinkPrefix-flake-info"
|
||||
|
Loading…
Reference in New Issue
Block a user