Commits

Ned Batchelder  committed 1a5f4cf

Add some beta-specific stuff to the home page.

  • Participants
  • Parent commits 7d8e3ce

Comments (0)

Files changed (4)

 publishbeta: px
 	rm -f $(WEBHOME)/beta/*.px
 	cp doc/_build/px/*.px $(WEBHOME)/beta
+	rm -f $(WEBHOME)/sample_html_beta/*.*
+	cp doc/sample_html_beta/*.* $(WEBHOME)/sample_html_beta
 
 # Add any Sphinx extension module names here, as strings. They can be extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'px_xlator']
+extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.ifconfig', 'px_xlator']
 
 # Add any paths that contain templates here, relative to this directory.
 templates_path = ['_templates']
 # When auto-doc'ing a class, write the class' docstring and the __init__ docstring
 # into the class docs.
 autoclass_content = "both"
+
+
+
+
+
+prerelease = bool(max(release).isalpha())
+
+def setup(app):
+    app.add_config_value('prerelease', False, 'env')
+    print "** Prerelease = %r" % prerelease

File doc/index.rst

 can show which parts of your code are being exercised by tests, and which are
 not.
 
-The latest version is 3.5b1, released 5 June 2011.
-It is supported on Python versions 2.3 through 3.2.
+.. ifconfig:: not prerelease
+
+    The latest version is coverage.py 3.4, released 10 September 2010.
+    It is supported on Python versions 2.3 through 3.2.
+
+.. ifconfig:: prerelease
+
+    The latest version is coverage.py 3.5b1, released 5 June 2011.
+    This is a pre-release build.  The usual warnings about possible bugs apply.
+    It is supported on Python versions 2.3 through 3.2.
+    The latest stable version is coverage.py 3.4, `described here`_.
+
+.. _described here: http://nedbatchelder.com/code.coverage
 
 
 Quick start
 
         $ coverage html
 
-    Then visit htmlcov/index.html in your browser, to see a
-    `report like this`_.
+    .. ifconfig:: not prerelease
+
+        Then visit htmlcov/index.html in your browser, to see a
+        `report like this`_.
+
+    .. ifconfig:: prerelease
+
+        Then visit htmlcov/index.html in your browser, to see a
+        `report like this one`_.
 
 .. _coverage page on the Python Package Index: http://pypi.python.org/pypi/coverage
 .. _report like this: /code/coverage/sample_html/index.html
+.. _report like this one: /code/coverage/sample_html_beta/index.html
 
 
 Using coverage.py
 .. _Bitbucket issue tracker: http://bitbucket.org/ned/coveragepy/issues
 .. _code repository: http://bitbucket.org/ned/coveragepy
 
-`I can be reached`__ in a number of ways, I'm happy to answer questions about
+`I can be reached`_ in a number of ways. I'm happy to answer questions about
 using coverage.py.  I'm also available hourly for consultation or custom
 development.
 
-__  http://nedbatchelder.com/site/aboutned.html
+.. _I can be reached:  http://nedbatchelder.com/site/aboutned.html
 
 
 
     install
     cmd
     config
-    api
     source
     excluding
     branch
     subprocess
+    api
     faq
     changes
 
     - Version and date in doc/index.rst
     - Version and copyright date in doc/conf.py
     - Version --version output in doc/install.rst
+    - Generate new sample_html to get the latest, incl footer version number:
+        cd C:\ned\cog\trunk
+        rmdir/s/q htmlcov
+        coverage run --branch --source=cogapp cogapp\test_cogapp.py CogTestsInMemory
+        coverage html
+        - IF BETA:
+            copy/y htmlcov\*.* C:\ned\coverage\trunk\doc\sample_html_beta
+        - ELSE:
+            copy/y htmlcov\*.* C:\ned\coverage\trunk\doc\sample_html
     - IF BETA:
         - Build and publish docs:
             $ make publishbeta
     - ELSE:
-        - Generate new sample_html to get the latest, incl footer version number:
-            cd C:\ned\cog\trunk
-            rmdir/s/q htmlcov
-            coverage run --branch --source=cogapp cogapp\test_cogapp.py CogTestsInMemory
-            coverage html
-            copy/y htmlcov\*.* C:\ned\coverage\trunk\doc\sample_html
         - Build and publish docs:
             $ make px publish
 - Kits: