fix beta version marker handling

pull/30/head
Sebastien Bourdeauducq 2019-11-14 17:44:36 +08:00
parent 961dcac63d
commit 303bc7b162
2 changed files with 7 additions and 0 deletions

View File

@ -2,10 +2,16 @@ let
pkgs = import <nixpkgs> {};
artiqSrc = <artiqSrc>;
generatedNix = pkgs.runCommand "generated-nix" { buildInputs = [ pkgs.nix pkgs.git ]; }
# keep in sync with artiq-fast/pkgs/artiq-version.nix
''
cp --no-preserve=mode,ownership -R ${./artiq-fast} $out
REV=`git --git-dir ${artiqSrc}/.git rev-parse HEAD`
MAJOR_VERSION=`cat ${artiqSrc}/MAJOR_VERSION`
if [ -e BETA ]; then
SUFFIX=".beta"
else
SUFFIX=""
fi
COMMIT_COUNT=`git --git-dir ${artiqSrc}/.git rev-list --count HEAD`
TIMESTAMP=`git --git-dir ${artiqSrc}/.git log -1 --format=%ct`
ARTIQ_SRC_CLEAN=`mktemp -d`

View File

@ -3,6 +3,7 @@ let
artiq-version = stdenv.mkDerivation {
name = "artiq-version";
src = import ./artiq-src.nix { inherit fetchgit; };
# keep in sync with ../../artiq-fast.nix
buildPhase = ''
REV=`${git}/bin/git rev-parse HEAD`
MAJOR_VERSION=`cat MAJOR_VERSION`