Revert adding .git-revision unconditionally
This reverts commit 1e534e234b
.
We already should have a .git directory if it is managed via Git,
otherwise there is no way to get the Git revision if neither
.git-revision or .git is present.
But having .git-revision _and_ .git present seems very much redundant to
me.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Cc: @bennofs, @Profpatsch
Issue: #17218
This commit is contained in:
parent
199f5a2844
commit
55d881eea3
|
@ -17,6 +17,6 @@ getVersion() {
|
||||||
if nixpkgs=$(nix-instantiate --find-file nixpkgs "$@"); then
|
if nixpkgs=$(nix-instantiate --find-file nixpkgs "$@"); then
|
||||||
getVersion $nixpkgs
|
getVersion $nixpkgs
|
||||||
if [ -n "$rev" ]; then
|
if [ -n "$rev" ]; then
|
||||||
echo "$rev"
|
echo ".git.$rev"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
|
@ -311,10 +311,9 @@ fi
|
||||||
# nixos-version shows something useful).
|
# nixos-version shows something useful).
|
||||||
if [ -n "$canRun" ]; then
|
if [ -n "$canRun" ]; then
|
||||||
if nixpkgs=$(nix-instantiate --find-file nixpkgs "${extraBuildFlags[@]}"); then
|
if nixpkgs=$(nix-instantiate --find-file nixpkgs "${extraBuildFlags[@]}"); then
|
||||||
revision=$($SHELL $nixpkgs/nixos/modules/installer/tools/get-git-revision "${extraBuildFlags[@]}" || true)
|
suffix=$($SHELL $nixpkgs/nixos/modules/installer/tools/get-version-suffix "${extraBuildFlags[@]}" || true)
|
||||||
if [ -n "$revision" ]; then
|
if [ -n "$suffix" ]; then
|
||||||
echo -n ".git.$revision" > "$nixpkgs/.version-suffix" || true
|
echo -n "$suffix" > "$nixpkgs/.version-suffix" || true
|
||||||
echo -n "$revision" > "$nixpkgs/.git-revision" || true
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue