[Spice-devel] [spice-gtk 1/2] meson: fix micro on release tag
Victor Toso
victortoso at redhat.com
Fri Jan 18 10:18:01 UTC 2019
Hi,
On Fri, Jan 18, 2019 at 05:13:44AM -0500, Frediano Ziglio wrote:
> >
> > On Fri, Jan 18, 2019 at 10:57:05AM +0100, Victor Toso wrote:
> > > From: Victor Toso <me at victortoso.com>
> > >
> > > On 0.36, there is no third value so we would get:
> > >
> > > src/meson.build:11:0: ERROR: Index 2 out of bounds of array of size 2.
> > >
> > > Signed-off-by: Victor Toso <victortoso at redhat.com>
> > > ---
> > > src/meson.build | 11 ++++++++---
> > > 1 file changed, 8 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/src/meson.build b/src/meson.build
> > > index d9614cb..bf39464 100644
> > > --- a/src/meson.build
> > > +++ b/src/meson.build
> > > @@ -8,10 +8,15 @@ spice_gtk_include += [include_directories('.')]
> > > version_info = meson.project_version().split('.')
> > > major = '@0@'.format(version_info[0])
> > > minor = '@0@'.format(version_info[1])
> > > -micro = version_info[2].split('-')[0]
> > > -if micro == ''
> > > - micro = '0'
> > > +if version_info.length() > 2
> > > + micro = version_info[2].split('-')[0]
> > > + if micro == ''
>
> I doubt there would be a version with x.y.-z syntax
:)
> > > + micro = '0'
> > > + endif
> > > +else
> > > + micro = '0'
> >
>
> Why not
>
> micro = '0'
> if version_info.length() > 2
> micro = version_info[2].split('-')[0]
> endif
Just because of `if micro == ''` part.
I don't mind changing if you prefer this way.
> > Copy-paste issue, bad indentation. Fixed locally.
> >
> > > endif
> > > +
> > > version_data = configuration_data()
> > > version_data.set('SPICE_GTK_MAJOR_VERSION', major)
> > > version_data.set('SPICE_GTK_MINOR_VERSION', minor)
>
> Frediano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20190118/e728a634/attachment-0001.sig>
More information about the Spice-devel
mailing list