From a98152fb946b88dd7fc8a2255279ef5a15f1d441 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Tue, 7 Aug 2018 16:21:42 -0400 Subject: [PATCH] Fail the build if the version is updated and carnix isn't --- default.nix | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/default.nix b/default.nix index e499969..eefd8e7 100644 --- a/default.nix +++ b/default.nix @@ -23,9 +23,6 @@ in { in pkgs.runCommand "ofborg-rs-symlink-compat" { src = stripDeps build; } '' - - set -x - mkdir -p $out/bin for f in $(find $src -type f); do bn=$(basename "$f") @@ -43,6 +40,32 @@ in { test -e $out/bin/github_comment_poster test -e $out/bin/log_message_collector test -e $out/bin/evaluation_filter + + # Verify that the outpath contains the version number matching the + # Cargo.toml + if ! grep -q 'version = "${drv.crateVersion}"' ${./ofborg/Cargo.toml}; then + cat <