| # ----------------------------------------------------------------------------- |
| # Uploads ONOS distributable bits. |
| # ----------------------------------------------------------------------------- |
| #FIXME need to export s3Creds |
| from os.path import isfile, join |
| from uploadToS3 import uploadFile |
| prefix = 'onos-(\d+\.\d+\.\d+)' |
| ext = '\.(?:tar\.gz|zip|deb|noarch\.rpm)' |
| for file in listdir( path ): |
| filePath = join( path, file ) |
| if not isfile( filePath ): |
| regex = prefix + buildNum + ext |
| match = re.match( regex, file ) |
| if 'NIGHTLY' in build or 'rc' in build: |
| uploadFile(filePath, dest='nightly/') |
| #no build; this is a release |
| uploadFile(filePath, dest='release/') |
| if __name__ == '__main__': |