diff options
| author | Damien Regad <dregad@mantisbt.org> | 2015-12-27 15:46:38 +0100 |
|---|---|---|
| committer | Damien Regad <dregad@mantisbt.org> | 2015-12-27 16:03:05 +0100 |
| commit | 81bb6fe8b56287edb9e6a0bb36569084a0c69361 (patch) | |
| tree | 28c555459843ac366286fbecd0d5ff74cf32749c /scripts | |
| parent | 0f232a4e3a57ba54acfbf3aa8e4bfb8381f94477 (diff) | |
| download | adodb-81bb6fe8b56287edb9e6a0bb36569084a0c69361.tar.gz adodb-81bb6fe8b56287edb9e6a0bb36569084a0c69361.tar.bz2 adodb-81bb6fe8b56287edb9e6a0bb36569084a0c69361.zip | |
Move upload code to dedicated functions
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/uploadrelease.py | 60 |
1 files changed, 35 insertions, 25 deletions
diff --git a/scripts/uploadrelease.py b/scripts/uploadrelease.py index a973a816..bf69dda6 100755 --- a/scripts/uploadrelease.py +++ b/scripts/uploadrelease.py @@ -102,6 +102,39 @@ def sourceforge_target_dir(version): return directory +def upload_release_files(): + ''' Upload release files from source directory to SourceForge + ''' + version = get_release_version() + target = sf_files + sourceforge_target_dir(version) + + print + print "Uploading release files..." + print " Source:", release_path + print " Target: " + target + print + call_rsync( + username, + "--exclude=docs", + path.join(release_path, "*"), + target + ) + + +def upload_documentation(): + ''' Upload documentation to Sourceforge web site + ''' + print + print "Uploading documentation..." + print + call_rsync( + username, + "", + path.join(release_path, "docs", "*"), + sf_doc + ) + + def main(): # Get command-line options try: @@ -149,34 +182,11 @@ def main(): # Start upload process print "ADOdb release upload script" - # Upload release files if upload_files: - version = get_release_version() - - target = sf_files + sourceforge_target_dir(version) - print - print "Uploading release files..." - print " Source:", release_path - print " Target: " + target - print - call_rsync( - username, - "--exclude=docs", - path.join(release_path, "*"), - target - ) + upload_release_files() - # Upload documentation if upload_doc: - print - print "Uploading documentation..." - print - call_rsync( - username, - "", - path.join(release_path, "docs", "*"), - sf_doc - ) + upload_documentation() #end main() |
