mirror of
https://github.com/alibaba/arthas.git
synced 2026-11-30 07:32:57 +00:00
only show final release version in doc
This commit is contained in:
1 parent
39a7613335
commit
4ac39bd69a
2 files changed
+22
No files matched your search
@@ -7,6 +7,7 @@
|
||||
import sys
|
||||
import os
|
||||
import shlex
|
||||
import urllib
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
@@ -74,6 +75,16 @@ for projectChildrenElem in list(pomXml.getroot()):
|
||||
for parentChildrenElem in list(projectChildrenElem):
|
||||
if parentChildrenElem.tag == '{http://maven.apache.org/POM/4.0.0}version':
|
||||
version = parentChildrenElem.text
|
||||
|
||||
# if version is SNAPSHOT, read final release from maven center
|
||||
if version.endswith('SNAPSHOT'):
|
||||
metaXmlUrl = urllib.request.urlopen('https://repo1.maven.org/maven2/com/taobao/arthas/arthas-packaging/maven-metadata.xml')
|
||||
metaXml=ET.parse(metaXmlUrl)
|
||||
for metadataChildrenElem in list(metaXml.getroot()):
|
||||
if metadataChildrenElem.tag == 'versioning':
|
||||
for versioningChildrenElem in list(metadataChildrenElem):
|
||||
if versioningChildrenElem.tag == 'release':
|
||||
version = versioningChildrenElem.text
|
||||
release = version
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
import sys
|
||||
import os
|
||||
import shlex
|
||||
import urllib
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
@@ -74,6 +75,16 @@ for projectChildrenElem in list(pomXml.getroot()):
|
||||
for parentChildrenElem in list(projectChildrenElem):
|
||||
if parentChildrenElem.tag == '{http://maven.apache.org/POM/4.0.0}version':
|
||||
version = parentChildrenElem.text
|
||||
|
||||
# if version is SNAPSHOT, read final release from maven center
|
||||
if version.endswith('SNAPSHOT'):
|
||||
metaXmlUrl = urllib.request.urlopen('https://repo1.maven.org/maven2/com/taobao/arthas/arthas-packaging/maven-metadata.xml')
|
||||
metaXml=ET.parse(metaXmlUrl)
|
||||
for metadataChildrenElem in list(metaXml.getroot()):
|
||||
if metadataChildrenElem.tag == 'versioning':
|
||||
for versioningChildrenElem in list(metadataChildrenElem):
|
||||
if versioningChildrenElem.tag == 'release':
|
||||
version = versioningChildrenElem.text
|
||||
release = version
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
|
||||
Reference in new issue
Block a user