diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2009-10-20 18:56:47 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2009-10-20 19:03:35 +0800 |
commit | c865d84deb0bb7c49f59ff6cd77064b6da86ff7f (patch) | |
tree | 27869289a325d5b17ba3e6e934d095c0eefbcf3c /release.py | |
parent | 725ab93e1b5b3e6ecdbbf3413b57d499ba6f23d9 (diff) | |
download | gsoc2013-empathy-c865d84deb0bb7c49f59ff6cd77064b6da86ff7f.tar gsoc2013-empathy-c865d84deb0bb7c49f59ff6cd77064b6da86ff7f.tar.gz gsoc2013-empathy-c865d84deb0bb7c49f59ff6cd77064b6da86ff7f.tar.bz2 gsoc2013-empathy-c865d84deb0bb7c49f59ff6cd77064b6da86ff7f.tar.lz gsoc2013-empathy-c865d84deb0bb7c49f59ff6cd77064b6da86ff7f.tar.xz gsoc2013-empathy-c865d84deb0bb7c49f59ff6cd77064b6da86ff7f.tar.zst gsoc2013-empathy-c865d84deb0bb7c49f59ff6cd77064b6da86ff7f.zip |
release.py: stop hardcoding the GNOME username used for uploads
Diffstat (limited to 'release.py')
-rwxr-xr-x | release.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/release.py b/release.py index 03cd2eb91..ffb25dea2 100755 --- a/release.py +++ b/release.py @@ -10,7 +10,6 @@ from string import Template from optparse import OptionParser last_tag_patern = 'EMPATHY_2_27*' -username = 'xclaesse' upload_server = 'master.gnome.org' template = '''\ $name $version is now available for download from: @@ -246,7 +245,16 @@ class Project: self.package_version.replace('.', '_') self.exec_cmd('git tag -m "Tagged for release %s." %s' % ( self.package_version, new_tag)) + def _get_username(self): + username = os.environ.get('GNOME_ACCOUNT_NAME') + if username is not None: + return username + + return os.getlogin() + + def upload_tarball(self): + username = self._get_username() tarball = '%s-%s.tar.gz' % (self.package_name.lower(), self.package_version) cmd = 'scp %s %s@%s:' % (tarball, username, upload_server) |