You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2021/11/12 02:55:18 UTC

[superset] branch bugfix/13674 created (now 94f95a3)

This is an automated email from the ASF dual-hosted git repository.

mayurnewase pushed a change to branch bugfix/13674
in repository https://gitbox.apache.org/repos/asf/superset.git.


      at 94f95a3  Take version from latest git, bump version in package.json

This branch includes the following new commits:

     new 94f95a3  Take version from latest git, bump version in package.json

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[superset] 01/01: Take version from latest git, bump version in package.json

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mayurnewase pushed a commit to branch bugfix/13674
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 94f95a3badc8394cc4c3ded6ce2a57ca36f50e94
Author: Mayur <ma...@gmail.com>
AuthorDate: Fri Nov 12 08:22:47 2021 +0530

    Take version from latest git, bump version in package.json
---
 setup.py                       | 21 +++++++++++++++------
 superset-frontend/package.json |  2 +-
 2 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/setup.py b/setup.py
index ce21f9a..4ca45e51 100644
--- a/setup.py
+++ b/setup.py
@@ -25,12 +25,19 @@ from setuptools import find_packages, setup
 BASE_DIR = os.path.abspath(os.path.dirname(__file__))
 
 PACKAGE_JSON = os.path.join(BASE_DIR, "superset-frontend", "package.json")
-with open(PACKAGE_JSON, "r") as package_file:
-    version_string = json.load(package_file)["version"]
 
 with io.open("README.md", "r", encoding="utf-8") as f:
     long_description = f.read()
 
+def get_version():
+    version_string = "1.3.2" # current latest as last fallback
+    try:
+        s = subprocess.check_output(["git", "describe", "--tags", "--abbrev=0"])
+        version_string = s.decode().strip()
+    except:
+        with open(PACKAGE_JSON, "r") as package_file:
+            version_string = json.load(package_file)["version"]
+    return version_string
 
 def get_git_sha() -> str:
     try:
@@ -41,9 +48,11 @@ def get_git_sha() -> str:
 
 
 GIT_SHA = get_git_sha()
-version_info = {"GIT_SHA": GIT_SHA, "version": version_string}
+GIT_VERSION = get_version()
+
+version_info = {"GIT_SHA": GIT_SHA, "version": GIT_VERSION}
 print("-==-" * 15)
-print("VERSION: " + version_string)
+print("VERSION: " + GIT_VERSION)
 print("GIT SHA: " + GIT_SHA)
 print("-==-" * 15)
 
@@ -58,7 +67,7 @@ setup(
     description="A modern, enterprise-ready business intelligence web application",
     long_description=long_description,
     long_description_content_type="text/markdown",
-    version=version_string,
+    version=GIT_VERSION,
     packages=find_packages(),
     include_package_data=True,
     zip_safe=False,
@@ -165,7 +174,7 @@ setup(
     author="Apache Software Foundation",
     author_email="dev@superset.apache.org",
     url="https://superset.apache.org/",
-    download_url="https://www.apache.org/dist/superset/" + version_string,
+    download_url="https://www.apache.org/dist/superset/" + GIT_VERSION,
     classifiers=[
         "Programming Language :: Python :: 3.7",
         "Programming Language :: Python :: 3.8",
diff --git a/superset-frontend/package.json b/superset-frontend/package.json
index 2c2115e..32a92b6 100644
--- a/superset-frontend/package.json
+++ b/superset-frontend/package.json
@@ -1,6 +1,6 @@
 {
   "name": "superset",
-  "version": "0.0.0dev",
+  "version": "superset-helm-chart-0.3.12",
   "description": "Superset is a data exploration platform designed to be visual, intuitive, and interactive.",
   "license": "Apache-2.0",
   "directories": {