On Fri, Mar 25, 2016 at 09:58:19PM +0300, Dmitry Yemanov wrote:
> 25.03.2016 21:35, Adriano dos Santos Fernandes wrote:
> >
> >> Can we call git from the filter and expect the repository directory
> >> being the current one? What about multiple shell commands?
> >
> > I think no. But now we have a build number for each date, so with the
> > date we can simulate the same per-day buildno we have now.
> 
> Sorry for being absolutely dumb, but HOW? :-) I'm obviously missing the 
> point.

You can set the export-subst attribute for a script which would use e.g.

  ...
  timestamp='$Format:%ct$'
  if [ "${timestamp:0:1}" = '$' ]; then
      ts=`git log -1 --pretty='%ct'`
  fi
  build_num=$[timestamp / 86400 - 16811]
  ...

plus some fallback to handle the case "git log" fails, i.e. we have
neither source exported using "git archive" nor a git repository.

                                                         Michal Kubecek


------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to