Skip to content

Commit

Permalink
sourcepush now takes an optional filter
Browse files Browse the repository at this point in the history
  • Loading branch information
erh committed Nov 12, 2012
1 parent 889fd75 commit 319dbf1
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions buildscripts/sourcepush.py
Expand Up @@ -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.