[devdocsgjs/wip/andyholmes/gnome-42: 1/2] GIR Scraper: account for two-digit API versions
- From: Andy Holmes <andyholmes src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [devdocsgjs/wip/andyholmes/gnome-42: 1/2] GIR Scraper: account for two-digit API versions
 
- Date: Mon,  7 Mar 2022 07:38:01 +0000 (UTC)
 
commit b592eee3de7ba55605c65356e481f4574f4e52e0
Author: Andy Holmes <andrew g r holmes gmail com>
Date:   Sun Mar 6 20:34:09 2022 -0800
    GIR Scraper: account for two-digit API versions
    
    The scraper generator for GIRs was only checking the first digit of
    versions when deciding whether to fallback to the namespace version of
    a GIR or the largest API change (ie. member annotate with `Since`).
    
    For example, `10 API` will now be chosen over `1.24+`, where previous
    the latter would be preferred.
 lib/tasks/gir.thor | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/lib/tasks/gir.thor b/lib/tasks/gir.thor
index 32881e25..2b6c04b6 100644
--- a/lib/tasks/gir.thor
+++ b/lib/tasks/gir.thor
@@ -92,7 +92,7 @@ class GirCLI < Thor
       version = determine_version gir
       version = guess_version gir if version.nil?
       api_version = scraper_info[:api_version] + ' API'
-      version = api_version if version.nil? || api_version[0] > version[0]
+      version = api_version if version.nil? || api_version[0..1] > version[0..1]
       version
     end
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]