-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add searching for latest revs and download #1
Conversation
bollenn
commented
May 30, 2017
- Add some functions to search for latest modified file or latest "version"
- Add function to download a file
31b7016
to
90744dd
Compare
rt_factory/rt_factory.py
Outdated
|
||
def get_link_to_last_version(self, repo, path): | ||
""" Searches for artifacts with the latest value in the "version" property. Only artifacts | ||
with a "version" property expressly defined in lower case will be taken into account. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by this? Will it give issue with version numbers like "V1.0.0" or "1.4.8-BETA"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, you need to set the "version" property... with this exact name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw, this is a copy paste from Artifactory API doc 😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😞
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ptillemans Out of curiosity: Artifactory does not provide a more intelligent way of getting the latest versions? As it knows the different types of the repositories (pypi, nuget, debian,...) I would expect it to be able to know based what the latest version is without needing to add an extra version property?
rt_factory/rt_factory.py
Outdated
url (str): Url to the file to be downloaded. | ||
path_to_file (str): Path + filename to be used for downloading the file. | ||
""" | ||
r = requests.get(url, stream=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r --> downloaded_file?
rt_factory/rt_factory.py
Outdated
path_to_file (str): Path + filename to be used for downloading the file. | ||
""" | ||
r = requests.get(url, stream=True) | ||
with open(path_to_file, 'wb') as f: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
f --> output_file?