Ver código fonte

HUE-521. version specification duplication

We hard code the version number in every setup.py in the whole distro.
We should just import it.
It's important that we dereference all of the version.py symlinks before the
tarball.
Alex (posi) Newman 14 anos atrás
pai
commit
fb0e52608b

+ 1 - 1
Makefile.tarball

@@ -78,7 +78,7 @@ $(BLD_DIR_PROD): apps crepo docs
 	@echo "--- Preparing general distribution tree at $@"
 	@rm -rf $@
 	@mkdir -p $@
-	tar -cf - $(PROD_INCLUDES) | tar -C $(BLD_DIR_PROD) -xf -
+	tar -h -cf - $(PROD_INCLUDES) | tar -C $(BLD_DIR_PROD) -xf -
 
 	@echo "---- Removing exclusions"
 	@for i in $(PROD_EXCLUDES) ; do rm -rf $(BLD_DIR_PROD)/$$i ; done

+ 20 - 0
VERSION

@@ -0,0 +1,20 @@
+# Licensed to Cloudera, Inc. under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  Cloudera, Inc. licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# This file should be the one source of truth for for versions within HUE.
+# It is at least included by each of the default hue app's setup.py.
+
+VERSION="1.2.0"

+ 1 - 0
apps/about/hueversion.py

@@ -0,0 +1 @@
+../../VERSION

+ 2 - 1
apps/about/setup.py

@@ -14,10 +14,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 from setuptools import setup, find_packages
+from hueversion import VERSION
 
 setup(
       name = "about",
-      version = "1.2.0",
+      version = VERSION,
       author = "HUE",
       url = 'http://github.com/cloudera/hue',
       description = "Displays 'about' info for easier trouble-shooting",

+ 1 - 0
apps/beeswax/hueversion.py

@@ -0,0 +1 @@
+../../VERSION

+ 2 - 1
apps/beeswax/setup.py

@@ -14,10 +14,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 from setuptools import setup, find_packages
+from hueversion import VERSION
 
 setup(
       name = "beeswax",
-      version = "1.2.0",
+      version = VERSION,
       author = "HUE",
       url = 'http://github.com/cloudera/hue',
       description = "Hive Interface on HUE",

+ 1 - 0
apps/filebrowser/hueversion.py

@@ -0,0 +1 @@
+../../VERSION

+ 2 - 1
apps/filebrowser/setup.py

@@ -14,10 +14,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 from setuptools import setup, find_packages
+from hueversion import VERSION
 
 setup(
       name = "filebrowser",
-      version = "1.2.0",
+      version = VERSION,
       author = "HUE",
       url = 'http://github.com/cloudera/hue',
       description = "HDFS browser",

+ 1 - 0
apps/hello/hueversion.py

@@ -0,0 +1 @@
+../../VERSION

+ 2 - 1
apps/hello/setup.py

@@ -14,10 +14,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 from setuptools import setup, find_packages
+from hueversion import VERSION
 
 setup(
       name = "hello",
-      version = "1.2.0",
+      version = VERSION,
       author = "HUE",
       url = 'http://github.com/cloudera/hue',
       description = "HUE Hello Example",

+ 1 - 0
apps/help/hueversion.py

@@ -0,0 +1 @@
+../../VERSION

+ 2 - 1
apps/help/setup.py

@@ -14,10 +14,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 from setuptools import setup, find_packages
+from hueversion import VERSION
 
 setup(
       name = "help",
-      version = "1.2.0",
+      version = VERSION,
       author = "HUE",
       url = 'http://github.com/cloudera/hue',
       description = "HUE Help",

+ 1 - 0
apps/jframegallery/hueversion.py

@@ -0,0 +1 @@
+../../VERSION

+ 2 - 1
apps/jframegallery/setup.py

@@ -14,10 +14,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 from setuptools import setup, find_packages
+from hueversion import VERSION
 
 setup(
       name = "jframegallery",
-      version = "1.2.0",
+      version = VERSION,
       author = "HUE",
       url = 'http://github.com/cloudera/hue',
       description = "HUE JFrame Gallery",

+ 1 - 0
apps/jobbrowser/hueversion.py

@@ -0,0 +1 @@
+../../VERSION

+ 2 - 1
apps/jobbrowser/setup.py

@@ -14,10 +14,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 from setuptools import setup, find_packages
+from hueversion import VERSION
 
 setup(
       name = "jobbrowser",
-      version = "1.2.0",
+      version = VERSION,
       url = 'http://github.com/cloudera/hue',
       author = "HUE",
       description = "Hadoop Job Browser",

+ 1 - 0
apps/jobsub/hueversion.py

@@ -0,0 +1 @@
+../../VERSION

+ 2 - 1
apps/jobsub/setup.py

@@ -14,10 +14,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 from setuptools import setup, find_packages
+from hueversion import VERSION
 
 setup(
       name = "jobsub",
-      version = "1.2.0",
+      version = VERSION,
       url = 'http://github.com/cloudera/hue',
       author = "HUE",
       description = "Hadoop Job Submission",

+ 1 - 0
apps/proxy/hueversion.py

@@ -0,0 +1 @@
+../../VERSION

+ 2 - 1
apps/proxy/setup.py

@@ -14,10 +14,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 from setuptools import setup, find_packages
+from hueversion import VERSION
 
 setup(
       name = "proxy",
-      version = "1.2.0",
+      version = VERSION,
       url = 'http://github.com/cloudera/hue',
       author = "HUE",
       description = "Reverse Proxy",

+ 1 - 0
apps/useradmin/hueversion.py

@@ -0,0 +1 @@
+../../VERSION

+ 2 - 1
apps/useradmin/setup.py

@@ -14,10 +14,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 from setuptools import setup, find_packages
+from hueversion import VERSION
 
 setup(
       name = "useradmin",
-      version = "1.2.0",
+      version = VERSION,
       author = "HUE",
       url = 'http://github.com/cloudera/hue',
       description = "HUE User Administration",

+ 1 - 0
desktop/core/hueversion.py

@@ -0,0 +1 @@
+../../VERSION

+ 2 - 1
desktop/core/setup.py

@@ -14,10 +14,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 from setuptools import setup, find_packages
+from hueversion import VERSION
 
 setup(
       name = "desktop",
-      version = "1.2.0",
+      version = VERSION,
       url = 'http://github.com/cloudera/hue',
       description = "HUE core",
       packages = find_packages('src'),