bottle_version: handle zpython bottle.
Closes Homebrew/homebrew#28870. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
		
							parent
							
								
									0ac11f8026
								
							
						
					
					
						commit
						2b9c350b27
					
				@ -12,6 +12,10 @@ class BottleVersion < Version
 | 
				
			|||||||
    m = /-(r\d+\.?\d*)/.match(stem)
 | 
					    m = /-(r\d+\.?\d*)/.match(stem)
 | 
				
			||||||
    return m.captures.first unless m.nil?
 | 
					    return m.captures.first unless m.nil?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # e.g. 00-5.0.5 from zpython-00-5.0.5.mavericks.bottle.tar.gz
 | 
				
			||||||
 | 
					    m = /(00-\d+\.\d+(\.\d+)+)/.match(stem)
 | 
				
			||||||
 | 
					    return m.captures.first unless m.nil?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # e.g. 1.6.39 from pazpar2-1.6.39.mavericks.bottle.tar.gz
 | 
					    # e.g. 1.6.39 from pazpar2-1.6.39.mavericks.bottle.tar.gz
 | 
				
			||||||
    m = /-(\d+\.\d+(\.\d+)+)/.match(stem)
 | 
					    m = /-(\d+\.\d+(\.\d+)+)/.match(stem)
 | 
				
			||||||
    return m.captures.first unless m.nil?
 | 
					    return m.captures.first unless m.nil?
 | 
				
			||||||
 | 
				
			|||||||
@ -40,4 +40,9 @@ class BottleVersionParsingTests < Test::Unit::TestCase
 | 
				
			|||||||
    assert_version_detected '0_5_0',
 | 
					    assert_version_detected '0_5_0',
 | 
				
			||||||
      '/usr/local/disco-0_5_0.mavericks.bottle.tar.gz'
 | 
					      '/usr/local/disco-0_5_0.mavericks.bottle.tar.gz'
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  def test_zpython_style
 | 
				
			||||||
 | 
					    assert_version_detected '00-5.0.5',
 | 
				
			||||||
 | 
					      '/usr/local/zpython-00-5.0.5.mavericks.bottle.tar.gz'
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user