Improve version sub-cmd output

main v0.0.1-rc2
Brian Picciano 2 weeks ago
parent e96fccae1b
commit ca003eaf85
  1. 9
      default.nix

@ -28,7 +28,7 @@ in rec {
buildInputs = [ pkgs.git pkgs.go ];
src = ./.;
inherit bootstrap releaseName;
inherit releaseName;
nixPkgsVersion = pkgsAttrs.version;
nixPkgsRev = pkgsAttrs.rev;
builtByUser = builtins.getEnv "USER";
@ -40,15 +40,10 @@ in rec {
cp -r "$src" srcCp
if [ "$bootstrap" != "" ]; then
hostName=$(tar -xzf "$bootstrap" --to-stdout ./hostname)
echo "Built for host: $hostName" >> "$versionFile"
fi
echo "Release: $releaseName" >> "$versionFile"
echo "Git Revision: $(cd srcCp && git rev-parse HEAD)" >> "$versionFile"
echo "Build date: $(date) ($(date +%s))" >> "$versionFile"
echo "Built by: $builtByUser" >> "$versionFile"
echo "Git rev: $(cd srcCp && git describe --always --long --dirty=' (dirty)')" >> "$versionFile"
echo "Go version: $(go version)" >> "$versionFile"
echo "Nixpkgs version: $nixPkgsVersion ($nixPkgsRev)" >> "$versionFile"

Loading…
Cancel
Save