def try_post_deploy():
    """Runs post_deploy() iff it has not been run for this version yet."""
    version_info = VersionInfo.get_by_key_name(
        os.environ['CURRENT_VERSION_ID'])
    if not version_info:
        q = VersionInfo.all()
        q.order('-blogokay_major')
        q.order('-blogokay_minor')
        q.order('-blogokay_rev')
        post_deploy(q.get())
def post_deploy(previous_version):
    """Carries out post-deploy functions, such as rendering static pages."""
    for task in post_deploy_tasks:
        logging.info(task)
        task(previous_version)
        
    new_version = VersionInfo(
        key_name=os.environ['CURRENT_VERSION_ID'],
        blogokay_major = BLOGOKAY_VERSION[0],
        blogokay_minor = BLOGOKAY_VERSION[1],
        blogokay_rev = BLOGOKAY_VERSION[2])
    new_version.put()