From d010497af892276dac5228a7347d7e44156f114e 2011-07-31 04:50:57 From: Fernando Perez Date: 2011-07-31 04:50:57 Subject: [PATCH] Update utilities to be all Python, use numbered paths in testing uploads. --- diff --git a/tools/release b/tools/release index 6a54c40..39cebde 100755 --- a/tools/release +++ b/tools/release @@ -15,8 +15,6 @@ distdir = pjoin(ipdir, 'dist') # Where I keep static backups of each release ipbackupdir = os.path.expanduser('~/ipython/backup') -# SSH root address of the archive site -archive = 'ipython@archive.ipython.org:archive.ipython.org' # Start in main IPython dir cd(ipdir) diff --git a/tools/testupload b/tools/testupload index 7929997..499e652 100755 --- a/tools/testupload +++ b/tools/testupload @@ -1,6 +1,19 @@ -#!/bin/sh -# Simple upload script to push up into the testing directory a local build -ipdir=$PWD/.. +#!/usr/bin/env python +"""Simple upload script to push up into the testing directory a local build +""" +from __future__ import print_function -cd $ipdir/dist -scp * ipython@archive.ipython.org:archive.ipython.org/testing/ +from toollib import * + +# Get main ipython dir, this will raise if it doesn't pass some checks +ipdir = get_ipdir() +distdir = pjoin(ipdir, 'dist') + +# Load release info +execfile(pjoin(ipdir, 'IPython','core','release.py')) + +# Build site addresses for file uploads +testing_site = '%s/testing/%s' % (archive, version) + +cd(distdir) +sh('scp * %s' % testing_site) diff --git a/tools/toollib.py b/tools/toollib.py index 684e1ac..f811b80 100644 --- a/tools/toollib.py +++ b/tools/toollib.py @@ -12,6 +12,11 @@ from distutils.dir_util import remove_tree pjoin = os.path.join cd = os.chdir +# Constants + +# SSH root address of the archive site +archive = 'ipython@archive.ipython.org:archive.ipython.org' + # Utility functions def sh(cmd): """Run system command in shell, raise SystemExit if it returns an error."""