[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: stable says master


On Thu, 31 Jul 2025 at 10:22, Benoît Minisini <
benoit.minisini@xxxxxxxxxxxxxxxx> wrote:

> Le 31/07/2025 à 11:20, Benoît Minisini a écrit :
> >
> > It's the autoconf macro that detects the current commit with git that
> > does not work anymore when Gambas is built in the OBS context.
> >
> > I don't know how to send the commit used by OBS to the inner Gambas
> > makefiles.
> >
> > Regards,
> >
>
> Mmm... Actually the detected commit is OK, it's just the branch name
> that is not detected correctly. Strange!
>
> --
> Benoît Minisini


line 8704 of main/configure

 if test "x${gb_detect_git}" != "x"; then
    gb_vcs_branch=`git rev-parse --abbrev-ref HEAD 2> /dev/null`
    gb_vcs_hash=`git rev-parse --short HEAD 2> /dev/null`
  else
    gb_detect_svn=`which svn 2> /dev/null`
      if test "x${gb_detect_svn}" != "x"; then
        gb_vcs_hash=`svn info --show-item last-changed-revision 2>
/dev/null`
      fi
  fi


the 1st git command "git rev-parse --abbrev-ref HEAD 2> /dev/null" is
getting the branch name.

not sure what to do about it though?
can configure detect if it is a OBS compile happening?
if it can then it will only be either master or stable so we can react to
version ending in .99 or not
This assumes variable $OpenSuseInstaller is 1 if OBS or 0 in any other
circumstance.


 if test "x${gb_detect_git}" != "x"; then
    gb_vcs_branch=`git rev-parse --abbrev-ref HEAD 2> /dev/null`
    gb_vcs_hash=`git rev-parse --short HEAD 2> /dev/null`
    [ ${gb_vcs_version##*.} != "99" -a $OpenSuseInstaller -eq 1 ]
&& gb_vcs_branch="stable" # here change to stable is revision is not .99
and is OBS compilation.
  else
    gb_detect_svn=`which svn 2> /dev/null`
      if test "x${gb_detect_svn}" != "x"; then
        gb_vcs_hash=`svn info --show-item last-changed-revision 2>
/dev/null`
      fi
  fi




Respects
BruceS

Follow-Ups:
Re: stable says masterBruce Steers <bsteers4@xxxxxxxxx>
Re: stable says masterBruce Steers <bsteers4@xxxxxxxxx>
References:
stable says masterBruce Steers <bsteers4@xxxxxxxxx>
Re: stable says masterBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: stable says mastergbWilly <gbWilly@xxxxxxxxxxxxxx>
Re: stable says masterBruce Steers <bsteers4@xxxxxxxxx>
Re: stable says masterBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: stable says masterBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>