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

setup.pl diff to fix versioning scheme



The current setup.pl only looks for whole version numbers.  This diff
will allow the updating of the a/b/c versions which are out there.  I
tested it on my machine updating from 1.1.1 to 1.1.1c

Index: setup.pl
===================================================================
--- setup.pl	(revision 155)
+++ setup.pl	(working copy)
@@ -312,7 +312,7 @@
    my $p = HTML::LinkExtor->new(\&cb);
    $p->parse($text) or die;
    foreach (@versions){
-        my ($chkversion) = $_ =~
/^\/ledger-smb\/ledger-smb-(\d{1,3}\.\d{1,3}\.\d{1,3})\.tar\.gz$/;
+        my ($chkversion) = $_ =~
/^\/ledger-smb\/ledger-smb-(\d{1,3}\.\d{1,3}\.\d{1,3}\w*)\.tar\.gz$/;
        $version = $chkversion if ($chkversion gt $version);
    }
    return $version;
@@ -322,7 +322,7 @@
    # Callback function for LinkExtor
    my($tag, %attr) = @_;
    return if $tag ne 'a';
-    return unless $attr{href} =~
/^\/ledger-smb\/ledger-smb-\d{1,3}\.\d{1,3}\.\d{1,3}\.tar\.gz$/;
+    return unless $attr{href} =~
/^\/ledger-smb\/ledger-smb-\d{1,3}\.\d{1,3}\.\d{1,3}\w*\.tar\.gz$/;
    push(@versions, values %attr);

}
Index: setup.pl
===================================================================
--- setup.pl	(revision 155)
+++ setup.pl	(working copy)
@@ -312,7 +312,7 @@
     my $p = HTML::LinkExtor->new(\&cb);
     $p->parse($text) or die;
     foreach (@versions){
-        my ($chkversion) = $_ =~ /^\/ledger-smb\/ledger-smb-(\d{1,3}\.\d{1,3}\.\d{1,3})\.tar\.gz$/;
+        my ($chkversion) = $_ =~ /^\/ledger-smb\/ledger-smb-(\d{1,3}\.\d{1,3}\.\d{1,3}\w*)\.tar\.gz$/;
         $version = $chkversion if ($chkversion gt $version);
     }
     return $version;
@@ -322,7 +322,7 @@
     # Callback function for LinkExtor
     my($tag, %attr) = @_;
     return if $tag ne 'a';
-    return unless $attr{href} =~ /^\/ledger-smb\/ledger-smb-\d{1,3}\.\d{1,3}\.\d{1,3}\.tar\.gz$/;
+    return unless $attr{href} =~ /^\/ledger-smb\/ledger-smb-\d{1,3}\.\d{1,3}\.\d{1,3}\w*\.tar\.gz$/;
     push(@versions, values %attr);
 
 }