Permalink
Browse files

sourcepush now takes an optional filter

  • Loading branch information...
erh committed Nov 12, 2012
1 parent 889fd75 commit 319dbf140ff6bf2629ecac844bf3b711850e4b4e
Showing with 9 additions and 2 deletions.
  1. +9 −2 buildscripts/sourcepush.py
View
@@ -57,14 +57,21 @@ def push_tag( bucket , tag , extension , gzip=False ):
os.remove( localName )
-def push_all():
+def push_all( filter=None):
tags = run_git("tag -l").strip().split( "\n" )
bucket = simples3.S3Bucket( settings.bucket , settings.id , settings.key )
for tag in tags:
+ if filter and tag.find( filter ) < 0:
+ print( "skipping %s because it doesn't match filter %s" % ( tag, filter ) )
+ continue
push_tag( bucket , tag , "tar" , True )
push_tag( bucket , tag , "zip" )
if __name__ == "__main__":
- push_all()
+ filter = None
+ if len(sys.argv) > 1:
+ filter = sys.argv[1]
+ print( "filter: %s" % filter )
+ push_all(filter)

0 comments on commit 319dbf1

Please sign in to comment.