Skip to content

Commit

Permalink
sage --package update: Display upstream URL and warn if upstream_url …
Browse files Browse the repository at this point in the history
…pattern does not use the VERSION variable
  • Loading branch information
Matthias Koeppe authored and dimpase committed Dec 12, 2023
1 parent 41c92b5 commit 77470f1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build/sage_bootstrap/updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,11 @@ def _update_version(self, new_version):
def download_upstream(self, download_url=None):
tarball = self.package.tarball
if download_url is None:
pattern = self.package.tarball_upstream_url_pattern
if pattern and 'VERSION' not in pattern:
print('Warning: upstream_url pattern does not use the VERSION variable')
download_url = self.package.tarball_upstream_url
if download_url is None:
raise ValueError("package has no default upstream_url pattern, download_url needed")
print('Downloading tarball to {0}'.format(tarball.upstream_fqn))
print('Downloading tarball from {0} to {1}'.format(download_url, tarball.upstream_fqn))
Download(download_url, tarball.upstream_fqn).run()

0 comments on commit 77470f1

Please sign in to comment.