Skip to content

Commit

Permalink
ci: upload artifacts to version directories
Browse files Browse the repository at this point in the history
  • Loading branch information
swistakm committed Aug 11, 2017
1 parent be21694 commit fcf8b14
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ build_script:
on_success:
- if [%APPVEYOR_REPO_BRANCH%]==[master] (
python.exe -m pip install dropbox &&
python.exe ci/dropbox_upload.py)
python.exe ci/dropbox_upload.py $(python.exe setup.py --version))

artifacts:
- path: dist\*
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ after_success:
- source dist-env/bin/activate
- python -m pip install dropbox
# note: we upload dists only on master commits
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then python ci/dropbox_upload.py; fi
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then python ci/dropbox_upload.py $(python setup.py --version); fi
4 changes: 3 additions & 1 deletion ci/dropbox_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"""

import os
import sys

import dropbox
import dropbox.files
Expand All @@ -28,7 +29,8 @@
for filename in files:
local_path = os.path.join(root, filename)
relative_path = os.path.relpath(local_path, 'dist')
dropbox_path = "/" + relative_path
# note: it is a dropbox path so there is no need for os.path.join()
dropbox_path = "/".join(sys.argv[1:] + [relative_path])

with open(local_path, 'rb') as f:
print("uploading %s" % local_path)
Expand Down

0 comments on commit fcf8b14

Please sign in to comment.