Add SOURCE_DATE_EPOCH environment variable

XMLWordPrintable

      Reproducible builds are gaining popularity recently. One option on way to deterministic builds is to use the last modification time of the source as a current time during build. SOURCE_DATE_EPOCH environment variable is a standard proposed by Debian team to achieve the goal.

      Right now we need to do something like this:

      Unable to find source-code formatter for language: shell. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      export SOURCE_DATE_EPOCH=$(git show -s --format=format:%ct HEAD)
      

      somewhere inside of build script for each step. Which is not so convenient since there is no variable sharing between the steps, hence forces you to use copy/paste pattern in your code.

      All needed info (commit timestamp) should be already available at the time pipeline starts, so it should be trivial enough to export as environment variable.

      More info.

            Assignee:
            Unassigned
            Reporter:
            ZipFile
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: