qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jr...@apache.org
Subject svn commit: r1668061 - in /qpid/site: Makefile python/qpid_site/generate.py scripts/gen-proton-release-api-doc scripts/gen-proton-release-examples scripts/gen-proton-release-page
Date Fri, 20 Mar 2015 15:38:32 GMT
Author: jross
Date: Fri Mar 20 15:38:31 2015
New Revision: 1668061

URL: http://svn.apache.org/r1668061
Log:
QPID-6334: Update release scripts for proton 0.9

Modified:
    qpid/site/Makefile
    qpid/site/python/qpid_site/generate.py
    qpid/site/scripts/gen-proton-release-api-doc
    qpid/site/scripts/gen-proton-release-examples
    qpid/site/scripts/gen-proton-release-page

Modified: qpid/site/Makefile
URL: http://svn.apache.org/viewvc/qpid/site/Makefile?rev=1668061&r1=1668060&r2=1668061&view=diff
==============================================================================
--- qpid/site/Makefile (original)
+++ qpid/site/Makefile Fri Mar 20 15:38:31 2015
@@ -51,7 +51,7 @@ clean:
 
 gen-release: gen-release-page gen-release-notes gen-release-api-doc gen-release-examples
gen-release-books
 
-gen-proton-release: gen-proton-release-page gen-proton-release-notes gen-proton-release-api-doc
gen-proton-release-examples
+gen-proton-release: gen-proton-release-page gen-proton-release-notes gen-proton-release-api-doc
 
 gen-dispatch-release: gen-dispatch-release-page gen-dispatch-release-notes gen-dispatch-release-books
gen-dispatch-release-api-doc
 

Modified: qpid/site/python/qpid_site/generate.py
URL: http://svn.apache.org/viewvc/qpid/site/python/qpid_site/generate.py?rev=1668061&r1=1668060&r2=1668061&view=diff
==============================================================================
--- qpid/site/python/qpid_site/generate.py (original)
+++ qpid/site/python/qpid_site/generate.py Fri Mar 20 15:38:31 2015
@@ -109,6 +109,25 @@ def export_release(module, release, chec
 
     return export_dir
 
+def export_release_from_git(module, release):
+    work_dir = make_temp_dir()
+    user_temp_dir = make_user_temp_dir()
+    dir_name = "qpid-{}-{}".format(module, release)
+    export_dir = join(user_temp_dir, "transom", dir_name)
+    url = "http://git-wip-us.apache.org/repos/asf/qpid-{}.git".format(module)
+
+    if is_dir(export_dir):
+        debug("Export already exists")
+        return export_dir
+
+    make_dirs(export_dir)
+
+    with working_dir(work_dir):
+        call("git clone --bare --branch '{}' '{}' .", release, url)
+        call("git archive '{}' | tar -xf - -C '{}'", release, export_dir)
+
+    return export_dir
+
 ## API reference ##
 
 _doxygen_conf_template = u"""
@@ -312,14 +331,21 @@ def render_release_notes(project, releas
     issues = _fetch_issues(project, release)
     lines = list()
 
-    lines.append("\n## New features and improvements\n")
-    lines.append(_render_issues(issues, "New Feature", "Improvement"))
-
-    lines.append("\n## Bugs fixed\n")
-    lines.append(_render_issues(issues, "Bug"))
-
-    lines.append("\n## Tasks\n")
-    lines.append(_render_issues(issues, "Task"))
+    improvements = _render_issues(issues, "New Feature", "Improvement")
+    bugs = _render_issues(issues, "Bug")
+    tasks = _render_issues(issues, "Task")
+
+    if improvements is not None:
+        lines.append("\n## New features and improvements\n")
+        lines.append(improvements)
+
+    if bugs is not None:
+        lines.append("\n## Bugs fixed\n")
+        lines.append(bugs)
+
+    if tasks is not None:
+        lines.append("\n## Tasks\n")
+        lines.append(tasks)
 
     return "\n".join(lines)
 
@@ -339,6 +365,7 @@ def _fetch_issues(project, release):
         query.append("resolution = 'fixed'")
     else:
         query.append("fixVersion = '{}'".format(release))
+        query.append("resolution = 'fixed'")
 
     query = " and ".join(query)
     query = "{} order by key asc".format(query)
@@ -376,7 +403,7 @@ def _render_issues(issues, *types):
                        if x["fields"]["issuetype"]["name"] in types]
 
     if not filtered_issues:
-        return "<div class=\"none\">None</div>"
+        return None
 
     lines = list()
 

Modified: qpid/site/scripts/gen-proton-release-api-doc
URL: http://svn.apache.org/viewvc/qpid/site/scripts/gen-proton-release-api-doc?rev=1668061&r1=1668060&r2=1668061&view=diff
==============================================================================
--- qpid/site/scripts/gen-proton-release-api-doc (original)
+++ qpid/site/scripts/gen-proton-release-api-doc Fri Mar 20 15:38:31 2015
@@ -20,19 +20,19 @@
 
 from qpid_site.generate import *
 
-def gen_protocol_engine(release, source_dir, release_dir):
-    component_dir = join(release_dir, "protocol-engine")
+def gen_api_doc(release, source_dir, release_dir):
+    component_dir = join(release_dir, "proton")
     remove(component_dir)
 
     dir = change_dir(source_dir)
     call("cmake .; make")
     change_dir(dir)
 
-    gen_c_protocol_engine(release, source_dir, component_dir)
-    gen_java_protocol_engine(release, source_dir, component_dir)
-    gen_python_protocol_engine(release, source_dir, component_dir)
+    gen_c_api_doc(release, source_dir, component_dir)
+    gen_java_api_doc(release, source_dir, component_dir)
+    gen_python_api_doc(release, source_dir, component_dir)
 
-def gen_c_protocol_engine(release, source_dir, component_dir):
+def gen_c_api_doc(release, source_dir, component_dir):
     include_dir = join(source_dir, "proton-c", "include")
     input_path = join(include_dir, "proton")
     output_dir = join(component_dir, "c", "api")
@@ -43,7 +43,7 @@ def gen_c_protocol_engine(release, sourc
                 strip_paths=(include_dir,),
                 output_dir=output_dir)
 
-def gen_java_protocol_engine(release, source_dir, component_dir):
+def gen_java_api_doc(release, source_dir, component_dir):
     input_path = join(source_dir, "proton-j", "src", "main", "java")
     input_namespace = "org.apache.qpid.proton"
     output_dir = join(component_dir, "java", "api")
@@ -54,7 +54,7 @@ def gen_java_protocol_engine(release, so
                 input_namespaces=(input_namespace,),
                 output_dir=output_dir)
 
-def gen_python_protocol_engine(release, source_dir, component_dir):
+def gen_python_api_doc(release, source_dir, component_dir):
     input_path = join(source_dir, "proton-c", "bindings", "python")
     input_namespace = "proton"
     output_dir = join(component_dir, "python", "api")
@@ -68,8 +68,8 @@ def gen_python_protocol_engine(release,
 ## Now do stuff ##
 
 release, release_dir, checkout_dir = setup_release_script()
-source_dir = export_release("proton", release, checkout_dir)
+source_dir = export_release_from_git("proton", release)
 
-gen_protocol_engine(release, source_dir, release_dir)
+gen_api_doc(release, source_dir, release_dir)
 
 notice("API documentation generated")

Modified: qpid/site/scripts/gen-proton-release-examples
URL: http://svn.apache.org/viewvc/qpid/site/scripts/gen-proton-release-examples?rev=1668061&r1=1668060&r2=1668061&view=diff
==============================================================================
--- qpid/site/scripts/gen-proton-release-examples (original)
+++ qpid/site/scripts/gen-proton-release-examples Fri Mar 20 15:38:31 2015
@@ -121,7 +121,7 @@ def gen_ruby_messenger(release, source_d
 ## Now do stuff ##
 
 release, release_dir, checkout_dir = setup_release_script()
-source_dir = export_release("proton", release, checkout_dir)
+source_dir = export_release_from_git("proton", release)
 
 gen_messenger(release, source_dir, release_dir)
 

Modified: qpid/site/scripts/gen-proton-release-page
URL: http://svn.apache.org/viewvc/qpid/site/scripts/gen-proton-release-page?rev=1668061&r1=1668060&r2=1668061&view=diff
==============================================================================
--- qpid/site/scripts/gen-proton-release-page (original)
+++ qpid/site/scripts/gen-proton-release-page Fri Mar 20 15:38:31 2015
@@ -22,12 +22,7 @@ from datetime import datetime
 from qpid_site.generate import *
 
 download_records = (
-    ("qpid-proton-{}.tar.gz", "AMQP Messenger, AMQP Protocol Engine"),
-    )
-
-component_records = (
-    ("messenger", "AMQP Messenger", "C, Java, Perl, PHP, Python, Ruby", "Linux, OS X, JVM",
"1.0"),
-    ("protocol-engine", "AMQP Protocol Engine", "C, Java, Perl, PHP, Python, Ruby", "Linux,
OS X, JVM", "1.0"),
+    ("qpid-proton-{}.tar.gz", "Qpid Proton"),
     )
 
 template = \
@@ -61,89 +56,57 @@ template = \
 
 # Qpid Proton {release}
 
-Proton is a high-performance, lightweight messaging library. More
+Qpid Proton is a high-performance, lightweight messaging library. More
 about [Qpid Proton](@site-url@/proton/index.html).
 
 For a detailed list of the changes in this release, see the [release
 notes](release-notes.html).
 
-## Downloads
+## Download
 
 It's important to [verify the
 integrity](@site-url@/download.html#verify-what-you-download) of the
 files you download.
 
-  || *Content* || *Download* || *Signature* ||
+  || *Content* || *Download* || *Verify* ||
   {downloads}
 
-## Components
-
-  || *Component* || *Languages* || *Platforms* || *AMQP versions* ||
-  {components}
-
 ## Documentation
 
 <div class="two-column" markdown="1">
-<div class="column" markdown="1">
-
-### Installation
-
- - [Installing Qpid Proton](http://svn.apache.org/repos/asf/qpid/proton/branches/{release}/README)
-
-### AMQP Protocol Engine
-
- - [C API reference](protocol-engine/c/api/files.html)
- - [Java API reference](protocol-engine/java/api/index.html)
- - [Python API reference](protocol-engine/python/api/index.html)
-
-</div>
-<div class="column" markdown="1">
-
-### AMQP Messenger
 
- - [C API reference](protocol-engine/c/api/messenger_8h.html)
- - [C examples](messenger/c/examples/index.html)
- - [Java API reference](protocol-engine/java/api/org/apache/qpid/proton/messenger/Messenger.html)
- - [Perl examples](messenger/perl/examples/index.html)
- - [PHP examples](messenger/php/examples/index.html)
- - [Python API reference](protocol-engine/python/api/proton.Messenger-class.html)
- - [Python examples](messenger/python/examples/index.html)
- - [Ruby examples](messenger/ruby/examples/index.html)
+ - [C API reference](proton/c/api/files.html)
+ - [Java API reference](proton/java/api/index.html)
+ - [Python API reference](proton/python/api/index.html)
+ - [Installing Qpid Proton](https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;a=blob_plain;f=README;hb={release})
 
 </div>
-</div>
 
 ## More information
 
  - [All release artefacts](http://archive.apache.org/dist/qpid/proton/{release})
  - [Resolved issues in JIRA]({issues_url})
- - [Source repository branch](http://svn.apache.org/repos/asf/qpid/proton/branches/{release})
- - [Source repository tag](http://svn.apache.org/repos/asf/qpid/proton/tags/{release})
+ - [Source repository branch](https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;a=tree;hb={release})
+ - [Source repository tag](https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;a=tag;h={release})
 """
 
 def gen_release_page(release, release_dir):
     output_path = join(release_dir, "index.md")
 
     downloads = list()
-    components = list()
-
-    source_artifact_url = "http://archive.apache.org/dist/qpid/proton/{}/{}"
+    artifact_url_template = "http://archive.apache.org/dist/qpid/proton/{}/{}"
 
     for artifact, summary in download_records:
         artifact = artifact.format(release)
-        artifact_url = source_artifact_url.format(release, artifact)
-        sig_url = "http://archive.apache.org/dist/qpid/proton/{}/{}.asc".format(release,
artifact)
-
-        args = summary, artifact, artifact_url, sig_url
-        downloads.append("|| {} || [{}]({}) || [PGP]({}) ||".format(*args))
+        artifact_url = artifact_url_template.format(release, artifact)
+        asc_url = "{}.asc".format(artifact_url)
+        md5_url = "{}.md5".format(artifact_url)
+        sha1_url = "{}.sha".format(artifact_url)
 
-    for key, name, languages, platforms, amqp_versions in component_records:
-        link = "[{}](@site-url@/components/{}/index.html)".format(name, key)
-        args = link, languages, platforms, amqp_versions
-        components.append("|| {} || {} || {} || {} ||".format(*args))
+        args = summary, artifact, artifact_url, asc_url, md5_url, sha1_url
+        downloads.append("|| {} || [{}]({}) || [ASC]({}), [MD5]({}), [SHA1]({}) ||".format(*args))
 
     downloads = "\n  ".join(downloads)
-    components = "\n  ".join(components)
 
     jql = "project = PROTON AND fixVersion = '{}' ORDER BY priority DESC".format(release)
     issues_url = "https://issues.apache.org/jira/issues/?jql={}".format(urllib.quote_plus(jql))
@@ -190,38 +153,17 @@ This content was generated at {time} on
 ## Documentation
 
 <div class="two-column" markdown="1">
-<div class="column" markdown="1">
-
-### Installation
-
- - [Installing Qpid Proton](http://svn.apache.org/repos/asf/qpid/proton/trunk/README)
-
-### AMQP Protocol Engine
 
- - [C API reference](protocol-engine/c/api/files.html)
- - [Java API reference](protocol-engine/java/api/index.html)
- - [Python API reference](protocol-engine/python/api/index.html)
+ - [C API reference](proton/c/api/files.html)
+ - [Java API reference](proton/java/api/index.html)
+ - [Python API reference](proton/python/api/index.html)
+ - [Installing Qpid Proton](https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;a=blob_plain;f=README;hb=HEAD)
 
 </div>
-<div class="column" markdown="1">
-
-### AMQP Messenger
-
- - [C API reference](protocol-engine/c/api/messenger_8h.html)
- - [C examples](messenger/c/examples/index.html)
- - [Java API reference](protocol-engine/java/api/org/apache/qpid/proton/messenger/Messenger.html)
- - [Perl examples](messenger/perl/examples/index.html)
- - [PHP examples](messenger/php/examples/index.html)
- - [Python API reference](protocol-engine/python/api/proton.Messenger-class.html)
- - [Python examples](messenger/python/examples/index.html)
- - [Ruby examples](messenger/ruby/examples/index.html)
-
-</div>
-</div>
 
 ## More information
 
- - [Source repository](http://svn.apache.org/repos/asf/qpid/proton/trunk)
+ - [Source repository](https://git-wip-us.apache.org/repos/asf/qpid-proton.git?a=tree)
 """
 
 def gen_trunk_release_page(release_dir):



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message