Browse Source

Fix twine upload for RC versions

Signed-off-by: Joffrey F <[email protected]>
Joffrey F 7 years ago
parent
commit
25e419c763
1 changed files with 3 additions and 2 deletions
  1. 3 2
      script/release/release.py

+ 3 - 2
script/release/release.py

@@ -173,9 +173,10 @@ def distclean():
 def pypi_upload(args):
 def pypi_upload(args):
     print('Uploading to PyPi')
     print('Uploading to PyPi')
     try:
     try:
+        rel = args.release.replace('-rc', 'rc')
         twine_upload([
         twine_upload([
-            'dist/docker_compose-{}*.whl'.format(args.release),
-            'dist/docker-compose-{}*.tar.gz'.format(args.release)
+            'dist/docker_compose-{}*.whl'.format(rel),
+            'dist/docker-compose-{}*.tar.gz'.format(rel)
         ])
         ])
     except HTTPError as e:
     except HTTPError as e:
         if e.response.status_code == 400 and 'File already exists' in e.message:
         if e.response.status_code == 400 and 'File already exists' in e.message: