<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi Magnus,<br>
      <br>
      I would use <a moz-do-not-send="true"
href="http://hackage.haskell.org/package/base-4.11.1.0/docs/System-Environment.html#v:getEnv">getEnv</a>
      or lookupEnv, along with Template Haskell and the <a
        moz-do-not-send="true"
href="http://hackage.haskell.org/package/template-haskell-2.13.0.0/docs/Language-Haskell-TH-Syntax.html#v:runIO">runIO</a>
      function. This would allow you to embed environment variables at
      compile time.<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 05/04/2018 07:47 AM, Magnus Therning
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:87a7tfbnaw.fsf@therning.org">I'm
      looking for a way to pick up the CI buildnumber from the
      environment
      <br>
      (e.g. $TRAVIS_BUILD_NUMBER) and use it as part of of the output of
      <br>
      `my-tool --version`. I don't really know where to start looking,
      so I'm
      <br>
      hoping someone on the list has already done something similar and
      can
      <br>
      point me to a working example :)
      <br>
      <br>
      /M
      <br>
      <br>
      --
      <br>
      Magnus Therning              OpenPGP: 0x927912051716CE39
      <br>
      email: <a class="moz-txt-link-abbreviated" href="mailto:magnus@therning.org">magnus@therning.org</a>   jabber: <a class="moz-txt-link-abbreviated" href="mailto:magnus@therning.org">magnus@therning.org</a>
      <br>
      twitter: magthe               <a class="moz-txt-link-freetext" href="http://therning.org/magnus">http://therning.org/magnus</a>
      <br>
      <br>
      I am always doing that which I cannot do, in order that I may
      learn
      <br>
      how to do it.
      <br>
          — Pablo Picasso
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
<a class="moz-txt-link-freetext" href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a>
Only members subscribed via the mailman list are allowed to post.</pre>
    </blockquote>
    <br>
    <div class="moz-signature">-- <br>
      <br>
      <strong
        style="color:#000;font-family:Helvetica,Arial;font-size:116%;">Vanessa
        McHale</strong><br>
      <span
        style="color:#000;font-family:Helvetica,Arial;font-size:100%;"><span
          style="color:#f00">Functional Compiler Engineer |</span>
        Chicago, IL</span><br>
    </div>
  </body>
</html>