You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ch...@apache.org on 2023/03/26 12:07:11 UTC
[kyuubi] branch master updated: [KYUUBI #4599] [DOCS] Simplify project version evaluation
This is an automated email from the ASF dual-hosted git repository.
chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi.git
The following commit(s) were added to refs/heads/master by this push:
new 5e541fa09 [KYUUBI #4599] [DOCS] Simplify project version evaluation
5e541fa09 is described below
commit 5e541fa09f92ea8b8ac637e71d1ce0adff1f6f3f
Author: Cheng Pan <ch...@apache.org>
AuthorDate: Sun Mar 26 20:07:02 2023 +0800
[KYUUBI #4599] [DOCS] Simplify project version evaluation
### _Why are the changes needed?_
`build/mvn` is slow than `grep`, the change is aim to simplify and speed up the project version evaluation in `docs/conf.py`
### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
- [ ] Add screenshots for manual tests if appropriate
- [x] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request
```
(apache-kyuubi) ➜ docs git:(doc-beeline) ✗ python
Python 3.8.12 (default, Sep 17 2021, 20:21:14)
[Clang 12.0.0 (clang-1200.0.32.29)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import subprocess
>>> subprocess.getoutput("grep 'kyuubi-parent' -C1 ../pom.xml | grep '<version>' | awk -F '[<>]' '{print $3}'")
'1.8.0-SNAPSHOT'
>>>
```
Closes #4599 from pan3793/doc-version.
Closes #4599
7458aef5b [Cheng Pan] [DOCS] Simplify project version calculation
Authored-by: Cheng Pan <ch...@apache.org>
Signed-off-by: Cheng Pan <ch...@apache.org>
---
docs/conf.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/conf.py b/docs/conf.py
index 3df98c6e3..dcf038314 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -64,7 +64,7 @@ copyright = year + ' The Apache Software Foundation, Licensed under the Apache L
author = 'Apache Kyuubi Community'
# The full version, including alpha/beta/rc tags
-release = subprocess.getoutput("cd .. && build/mvn help:evaluate -Dexpression=project.version|grep -v Using|grep -v INFO|grep -v WARNING|tail -n 1").split('\n')[-1]
+release = subprocess.getoutput("grep 'kyuubi-parent' -C1 ../pom.xml | grep '<version>' | awk -F '[<>]' '{print $3}'")
# -- General configuration ---------------------------------------------------