I would set up as many VMs as possible, each one set up to continuously test the distribution against a different version of the CLI automatically. It's even easier if you can install multiple versions on one machine. You usually can't support all versions of a binary of course, but if you have decent coverage across a reasonable number of versions, things should go well.

In your Makefile.PL (or alternate build system setup file), you can do a check and just die() if the version of the CLI on the client system does not conform to one of the versions that your tests pass against. If the CLI has a --version flag for instance, this is trivially easy to support.

By the sounds of it, the CLI is something installed by the client and used in production, so I would loudly advise against (ie. don't do it!) copying in the new CLI onto a system. Instead, advise the installer of the distribution when you stop the install process that their version of the CLI is/can not be supported, and they need to upgrade, and display the version options they have.

Here's an example where I check for a binary (perlbrew or berrybrew depending on OS-type). I don't exit, I just warn that we'll install anyways, but the Perl "binaries" I'm about to install to use the distribution's modules simply won't work (because they won't work period and it'll be clear; this isn't a situation where it may partly work, but other things could cause detrimental issues. If it were, I'd hard exit).


In reply to Re: Post installation tests for a wrapper to a CLI utility? by stevieb
in thread Post installation tests for a wrapper to a CLI utility? by nysus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.