forked from M-Labs/nix-scripts
fix beta version marker handling
This commit is contained in:
parent
961dcac63d
commit
303bc7b162
@ -2,10 +2,16 @@ let
|
|||||||
pkgs = import <nixpkgs> {};
|
pkgs = import <nixpkgs> {};
|
||||||
artiqSrc = <artiqSrc>;
|
artiqSrc = <artiqSrc>;
|
||||||
generatedNix = pkgs.runCommand "generated-nix" { buildInputs = [ pkgs.nix pkgs.git ]; }
|
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
|
cp --no-preserve=mode,ownership -R ${./artiq-fast} $out
|
||||||
REV=`git --git-dir ${artiqSrc}/.git rev-parse HEAD`
|
REV=`git --git-dir ${artiqSrc}/.git rev-parse HEAD`
|
||||||
MAJOR_VERSION=`cat ${artiqSrc}/MAJOR_VERSION`
|
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`
|
COMMIT_COUNT=`git --git-dir ${artiqSrc}/.git rev-list --count HEAD`
|
||||||
TIMESTAMP=`git --git-dir ${artiqSrc}/.git log -1 --format=%ct`
|
TIMESTAMP=`git --git-dir ${artiqSrc}/.git log -1 --format=%ct`
|
||||||
ARTIQ_SRC_CLEAN=`mktemp -d`
|
ARTIQ_SRC_CLEAN=`mktemp -d`
|
||||||
|
@ -3,6 +3,7 @@ let
|
|||||||
artiq-version = stdenv.mkDerivation {
|
artiq-version = stdenv.mkDerivation {
|
||||||
name = "artiq-version";
|
name = "artiq-version";
|
||||||
src = import ./artiq-src.nix { inherit fetchgit; };
|
src = import ./artiq-src.nix { inherit fetchgit; };
|
||||||
|
# keep in sync with ../../artiq-fast.nix
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
REV=`${git}/bin/git rev-parse HEAD`
|
REV=`${git}/bin/git rev-parse HEAD`
|
||||||
MAJOR_VERSION=`cat MAJOR_VERSION`
|
MAJOR_VERSION=`cat MAJOR_VERSION`
|
||||||
|
Loading…
Reference in New Issue
Block a user