build: introduce VERSION file (#394)

As a source of entire Envoy version number. Will use this file in envoy
main repo as well.

By this change, document version string will be changed in development
version:

  from: "1.6.0-data-plane-api-${GIT_SHA}"
  to: "1.6.0.dev-data-plane-api-${GIT_SHA}"

And in release version, for example, in v1.6.0 release:

  from: "1.6.0-tag-v1.6.0"
  to: "tag-v1.6.0"

The significant change is dropping the first version number string like
"1.6.0-" in the release version document.

Signed-off-by: Taiki Ono <taiks.4559@gmail.com>
pull/401/head
Taiki Ono 7 years ago committed by htuch
parent 170bce67cd
commit e9d927d4af
  1. 1
      BUILD
  2. 1
      VERSION
  3. 3
      docs/build.sh
  4. 4
      docs/conf.py

@ -0,0 +1 @@
exports_files(["VERSION"])

@ -0,0 +1 @@
1.6.0-dev

@ -73,7 +73,8 @@ done
rsync -av "${SCRIPT_DIR}"/root/ "${SCRIPT_DIR}"/conf.py "${GENERATED_RST_DIR}"
BUILD_SHA=$(git rev-parse HEAD)
[[ -z "${ENVOY_DOCS_VERSION_STRING}" ]] && ENVOY_DOCS_VERSION_STRING=data-plane-api-"${BUILD_SHA:0:6}"
VERSION_NUM=$(cat VERSION)
[[ -z "${ENVOY_DOCS_VERSION_STRING}" ]] && ENVOY_DOCS_VERSION_STRING="${VERSION_NUM}"-data-plane-api-"${BUILD_SHA:0:6}"
[[ -z "${ENVOY_DOCS_RELEASE_LEVEL}" ]] && ENVOY_DOCS_RELEASE_LEVEL=pre-release
export ENVOY_DOCS_VERSION_STRING ENVOY_DOCS_RELEASE_LEVEL

@ -67,9 +67,9 @@ if not os.environ.get('ENVOY_DOCS_VERSION_STRING'):
raise Exception("ENVOY_DOCS_VERSION_STRING env var must be defined")
# The short X.Y version.
version = u'1.6.0-' + os.environ['ENVOY_DOCS_VERSION_STRING']
version = os.environ['ENVOY_DOCS_VERSION_STRING']
# The full version, including alpha/beta/rc tags.
release = u'1.6.0-' + os.environ['ENVOY_DOCS_VERSION_STRING']
release = os.environ['ENVOY_DOCS_VERSION_STRING']
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

Loading…
Cancel
Save