diff --git a/configure.ac b/configure.ac index 2fb175c8..9a32651e 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([Hydra], [m4_esyscmd([echo -n $(cat ./version)$VERSION_SUFFIX])]) +AC_INIT([Hydra], [m4_esyscmd([echo -n $(cat ./version.txt)$VERSION_SUFFIX])]) AC_CONFIG_AUX_DIR(config) AM_INIT_AUTOMAKE([foreign serial-tests]) diff --git a/flake.nix b/flake.nix index 334119ce..25aaa1aa 100644 --- a/flake.nix +++ b/flake.nix @@ -6,7 +6,7 @@ outputs = { self, nixpkgs, nix }: let - version = "${builtins.readFile ./version}.${builtins.substring 0 8 self.lastModifiedDate}.${self.shortRev or "DIRTY"}"; + version = "${builtins.readFile ./version.txt}.${builtins.substring 0 8 self.lastModifiedDate}.${self.shortRev or "DIRTY"}"; pkgs = import nixpkgs { system = "x86_64-linux"; diff --git a/src/hydra-evaluator/hydra-evaluator.cc b/src/hydra-evaluator/hydra-evaluator.cc index 9a852536..2d7e68d9 100644 --- a/src/hydra-evaluator/hydra-evaluator.cc +++ b/src/hydra-evaluator/hydra-evaluator.cc @@ -233,12 +233,12 @@ struct Evaluator pqxx::work txn(*conn); if (jobset.evaluation_style == EvaluationStyle::ONE_AT_A_TIME) { - auto evaluation_res = txn.parameterized + auto evaluation_res = txn.exec_params ("select id from JobsetEvals " "where jobset_id = $1 " - "order by id desc limit 1") - (jobset.name.id) - .exec(); + "order by id desc limit 1" + ,jobset.name.id + ); if (evaluation_res.empty()) { // First evaluation, so allow scheduling. @@ -249,15 +249,15 @@ struct Evaluator auto evaluation_id = evaluation_res[0][0].as(); - auto unfinished_build_res = txn.parameterized + auto unfinished_build_res = txn.exec_params ("select id from Builds " "join JobsetEvalMembers " " on (JobsetEvalMembers.build = Builds.id) " "where JobsetEvalMembers.eval = $1 " " and builds.finished = 0 " - " limit 1") - (evaluation_id) - .exec(); + " limit 1" + ,evaluation_id + ); // If the previous evaluation has no unfinished builds // schedule! diff --git a/version b/version.txt similarity index 100% rename from version rename to version.txt