summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDamien Regad <dregad@mantisbt.org>2020-08-02 16:42:13 +0200
committerDamien Regad <dregad@mantisbt.org>2020-08-02 16:42:13 +0200
commitaa029ba9a0e419a477c3616993e905dff122baac (patch)
treee22677298baaba6b00d1c020c3dc10ecedbd200c /scripts
parent4d20bfcb49c430fcf8201e66a3ccb7e2650c56a7 (diff)
downloadadodb-aa029ba9a0e419a477c3616993e905dff122baac.tar.gz
adodb-aa029ba9a0e419a477c3616993e905dff122baac.tar.bz2
adodb-aa029ba9a0e419a477c3616993e905dff122baac.zip
New command-line option to skip SourceForge upload
This allows only updating the (previously) uploaded files information via the SourceForge Release API.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/uploadrelease.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/scripts/uploadrelease.py b/scripts/uploadrelease.py
index 9ed203da..d6338a52 100755
--- a/scripts/uploadrelease.py
+++ b/scripts/uploadrelease.py
@@ -29,8 +29,8 @@ sf_api_url = 'https://sourceforge.net/projects/adodb/files/{}/'
rsync_cmd = "rsync -vP --rsh ssh {opt} {src} {usr}@{dst}"
# Command-line options
-options = "hu:n"
-long_options = ["help", "user=", "dry-run"]
+options = "hu:ns"
+long_options = ["help", "user=", "dry-run", "skip-upload"]
def usage():
@@ -156,7 +156,7 @@ def load_env():
def process_command_line():
''' Retrieve command-line options and set global variables accordingly
'''
- global dry_run, username, release_path
+ global dry_run, username, release_path, skip_upload
# Get command-line options
try:
@@ -168,6 +168,7 @@ def process_command_line():
# Default values for flags
username = getpass.getuser()
+ skip_upload = False
dry_run = False
for opt, val in opts:
@@ -178,6 +179,9 @@ def process_command_line():
elif opt in ("-u", "--user"):
username = val
+ elif opt in ("-s", "--skip-upload"):
+ skip_upload = True
+
elif opt in ("-n", "--dry-run"):
print("Dry-run mode - files will not be uploaded or modified")
dry_run = True
@@ -269,7 +273,12 @@ def main():
load_env()
process_command_line()
- upload_release_files()
+ global skip_upload
+ if skip_upload:
+ print("Skipping upload of release files")
+ else:
+ upload_release_files()
+
set_sourceforge_file_info()
# end main()