Skip to content

Commit

Permalink
Refined upload procedure
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://code.matforge.org/fipy/branches/version-1_2@2939 d80e17d7-ff13-0410-a124-85740d801063
  • Loading branch information
guyer committed Jan 8, 2009
1 parent c00ed96 commit ceddb91
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 34 deletions.
18 changes: 11 additions & 7 deletions documentation/ADMINISTRATA.txt
Original file line number Diff line number Diff line change
Expand Up @@ -151,18 +151,22 @@ Combine the windows installer and examples into one archive.

Tag the repository as appropriate (see `SVN practices`_ above).

Upload the build products and documentation from `dist/` to MatForge:
Upload the build products and documentation from `dist/` to MatForge and
the web site to CTCMS:

* http://matforge.org/fipy/admin/general/downloader
$ python setup.py build_docs --upload --uploadwww

Update the current documentation links:
.. note::

You will need to manually upload the files

* http://matforge.org/fipy/wiki/FiPyManual?action=edit
* http://matforge.org/fipy/wiki/FiPyReference?action=edit
* http://matforge.org/fipy/admin/general/downloader

Upload to the CTCMS website::
and, if appropriate, update the links to current files:

$ python setup.py build_docs --upload
* http://matforge.org/fipy/wiki/FiPyDownloadCurrent?action=edit
* http://matforge.org/fipy/wiki/FiPyManual?action=edit
* http://matforge.org/fipy/wiki/FiPyReference?action=edit

.. warning:: Some versions of ``rsync`` on Mac OS X have caused problems
when they try to upload erroneous ``\rsrc`` directories. Version 2.6.2
Expand Down
2 changes: 1 addition & 1 deletion documentation/www/menu.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<ul>
<li><a href="index.html">Home</a>
<ul>
<li><a href="download/">Download</a></li>
<li><a href="http://matforge.org/fipy/wiki/FiPyDownloadCurrent">Download</a></li>
<li><a href="installation.html">Installation</a>
<ul>
<li><a href="macosx-installation.html">for Mac OS X</a></li>
Expand Down
54 changes: 28 additions & 26 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# FILE: "setup.py"
# created: 4/6/04 {1:24:29 PM}
# last update: 10/6/08 {10:46:21 AM}
# last update: 1/8/09 {10:31:39 AM}
# Author: Jonathan Guyer <guyer@nist.gov>
# Author: Daniel Wheeler <daniel.wheeler@nist.gov>
# Author: James Warren <jwarren@nist.gov>
Expand Down Expand Up @@ -393,33 +393,9 @@ def run (self):
for name in dirs:
os.rmdir(os.path.join(root, name))

if self.upload:

print "setting group and ownership of manuals..."
os.system('chgrp -R pfm documentation/manual/fipy.pdf')
os.system('chmod -R g+w documentation/manual/reference.pdf')
os.system('chmod -R g+w documentation/manual/reference.pdf')
os.system('chgrp -R pfm documentation/manual/fipy.pdf')

print "linking manuals to website..."
os.system('mkdir documentation/www/download/')
os.system('ln -sf ../../manual/fipy.pdf documentation/www/download/fipy-%s.pdf'%self.distribution.metadata.get_version())
os.system('ln -sf ../../manual/reference.pdf documentation/www/download/reference-%s.pdf'%self.distribution.metadata.get_version())

for name in ('.tar.gz', '.win32.zip'):
file = 'dist/FiPy-%s%s'%(self.distribution.metadata.get_version(), name)
print "setting group and ownership for %s ..."%file
os.system('chmod -R g+w %s'%file)
os.system('chgrp -R pfm %s'%file)

print "linking %s to website ..."%file
os.system('ln -sf ../../../%s documentation/www/download/'%file)


if self.upload or self.uploadwww:
if self.uploadwww:

print "setting group and ownership of web pages..."
os.system('chgrp -R pfm documentation/www/')
os.system('chmod -R g+w documentation/www/')

print "uploading web pages..."
Expand All @@ -429,6 +405,32 @@ def run (self):

print "activating web pages..."
os.system(os.environ['FIPY_WWWACTIVATE'])

if self.upload:
print "setting permissions of manuals..."
os.system('chmod -R g+w documentation/manual/fipy.pdf')
os.system('chmod -R g+w documentation/manual/reference.pdf')

print "linking manuals to `dist/`..."
os.system('mkdir dist/')
os.system('ln -f documentation/manual/fipy.pdf dist/fipy-%s.pdf'%self.distribution.metadata.get_version())
os.system('ln -f documentation/manual/reference.pdf dist/reference-%s.pdf'%self.distribution.metadata.get_version())

for name in ('.tar.gz', '.win32.zip'):
file = 'dist/FiPy-%s%s'%(self.distribution.metadata.get_version(), name)
print "setting permissions for %s ..."%file
os.system('chmod -R g+w %s'%file)

print "build products in `dist/` must be manually uploaded to MatForge"
import webbrowser
webbrowser.open("http://matforge.org/fipy/admin/general/downloader", new=True, autoraise=False)

print "please update the current links, as appropriate"
webbrowser.open_new_tab("http://matforge.org/fipy/wiki/FiPyDownloadCurrent?action=edit")
webbrowser.open_new_tab("http://matforge.org/fipy/wiki/FiPyManual?action=edit")
webbrowser.open_new_tab("http://matforge.org/fipy/wiki/FiPyReference?action=edit")




# run()
Expand Down

0 comments on commit ceddb91

Please sign in to comment.