Skip to content

Commit

Permalink
Fix version in CRH output if git describe fails
Browse files Browse the repository at this point in the history
This attempts to fix the Travis-CI build after the previous commit
(efccd10) which didn't correctly handle
the fact that Travis-CI is often unable to extract the Git version.
  • Loading branch information
tonyelewis committed Dec 27, 2017
1 parent efccd10 commit 96cef7d
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

using namespace cath::common;
using namespace cath::rslv::detail;
using namespace std::literals::string_literals;

using boost::algorithm::join;
using std::move;
Expand Down Expand Up @@ -61,10 +62,14 @@ void write_results_hits_processor::do_process_hits_for_query(const string
arg_calc_hits.get_full_hits()
);

const string CATH_TOOLS_VERSION{ CATH_TOOLS_GIT_VERSION };

for (const ostream_ref &ostream_ref : get_ostreams() ) {
if ( ! written_header && ! result_full_hits.empty() ) {
ostream_ref.get()
<< "# Generated by cath-resolve-hits " << CATH_TOOLS_GIT_VERSION << ", one of the cath-tools (https://github.com/UCLOrengoGroup/cath-tools)\n";
<< "# Generated by cath-resolve-hits"
<< ( CATH_TOOLS_VERSION.empty() ? ""s : ( " " + CATH_TOOLS_VERSION ) )
<< ", one of the cath-tools (https://github.com/UCLOrengoGroup/cath-tools)\n";
ostream_ref.get()
<< "#FIELDS "
<< join(
Expand Down

0 comments on commit 96cef7d

Please sign in to comment.