| Index: src/scripts/chromeos_version.sh
|
| diff --git a/src/scripts/chromeos_version.sh b/src/scripts/chromeos_version.sh
|
| index c039ae352f49546ddba0a342e3856c7c282de202..a2c64915fb78231614baa66be566a95f37868e10 100755
|
| --- a/src/scripts/chromeos_version.sh
|
| +++ b/src/scripts/chromeos_version.sh
|
| @@ -12,80 +12,79 @@
|
| # Version numbering scheme is much like Chrome's, with the addition of
|
| # double-incrementing branch number so trunk is always odd.
|
|
|
| -# Sets up a version number for release builds.
|
| -export_release_version() {
|
| - # Major/minor versions.
|
| - # Primarily for product marketing.
|
| - export CHROMEOS_VERSION_MAJOR=0
|
| - export CHROMEOS_VERSION_MINOR=5
|
| +HOSTNAME=$(hostname)
|
| +#############################################################################
|
| +# SET VERSION NUMBERS
|
| +#############################################################################
|
| +# Major/minor versions.
|
| +# Primarily for product marketing.
|
| +export CHROMEOS_VERSION_MAJOR=0
|
| +export CHROMEOS_VERSION_MINOR=5
|
|
|
| - # Branch number.
|
| - # Increment by 1 in a new release branch.
|
| - # Increment by 2 in trunk after making a release branch.
|
| - # Does not reset on a major/minor change (always increases).
|
| - # (Trunk is always odd; branches are always even).
|
| - export CHROMEOS_VERSION_BRANCH=23
|
| +# Major/minor versions.
|
| +# Primarily for product marketing.
|
| +export CHROMEOS_VERSION_MAJOR=0
|
| +export CHROMEOS_VERSION_MINOR=5
|
|
|
| - # Patch number.
|
| - # Increment by 1 each release on a branch.
|
| - # Reset to 0 when increasing branch number.
|
| - export CHROMEOS_VERSION_PATCH=0
|
| +# Branch number.
|
| +# Increment by 1 in a new release branch.
|
| +# Increment by 2 in trunk after making a release branch.
|
| +# Does not reset on a major/minor change (always increases).
|
| +# (Trunk is always odd; branches are always even).
|
| +export CHROMEOS_VERSION_BRANCH=23
|
|
|
| - # Codename of this version.
|
| - export CHROMEOS_VERSION_CODENAME=""
|
| -}
|
| +# Patch number.
|
| +# Increment by 1 each release on a branch.
|
| +# Reset to 0 when increasing branch number.
|
| +export CHROMEOS_VERSION_PATCH=0
|
|
|
| -# Sets up a version for developer builds.
|
| -export_developer_version() {
|
| - # Use an arbitrarily high number to indicate that this is a dev build.
|
| - export CHROMEOS_VERSION_MAJOR=999
|
| -
|
| - # Use the SVN revision number of the tree here.
|
| - # TODO(rtc): Figure out how to do this.
|
| - export CHROMEOS_VERSION_MINOR=999
|
| -
|
| - # Use the day of year and two digit year.
|
| - export CHROMEOS_VERSION_BRANCH=$(date +"%j%y")
|
| -
|
| - export CHROMEOS_VERSION_PATCH=$(date +"%H%M%S")
|
| -
|
| - # Sets the codename to the user who built the image. This
|
| - # will help us figure out who did the build if a different
|
| - # person is debugging the system.
|
| - export CHROMEOS_VERSION_CODENAME="$USER"
|
| -}
|
| -
|
| -export_version_string() {
|
| -# Version string. Not indentied to appease bash.
|
| -export CHROMEOS_VERSION_STRING=\
|
| -"${CHROMEOS_VERSION_MAJOR}.${CHROMEOS_VERSION_MINOR}"\
|
| -".${CHROMEOS_VERSION_BRANCH}.${CHROMEOS_VERSION_PATCH}"
|
| -}
|
| +# Codename of this version.
|
| +export CHROMEOS_VERSION_CODENAME=""
|
| +
|
|
|
| +#############################################################################
|
| +# SET VERSION STRINGS
|
| +#############################################################################
|
| # Official builds must set
|
| # CHROMEOS_OFFICIAL=1
|
| -# CHROMEOS_REVISION=(the subversion revision being built).
|
| # Note that ${FOO:-0} means default-to-0-if-unset; ${FOO:?} means die-if-unset.
|
| if [ ${CHROMEOS_OFFICIAL:-0} -eq 1 ]
|
| then
|
| # Official builds (i.e., buildbot)
|
| - export_release_version
|
| - export_version_string
|
| export CHROMEOS_VERSION_NAME="Chrome OS"
|
| export CHROMEOS_VERSION_TRACK="dev-channel"
|
| export CHROMEOS_VERSION_AUSERVER="https://tools.google.com/service/update2"
|
| export CHROMEOS_VERSION_DEVSERVER=""
|
| +elif [ "$USER" = "chrome-bot" ]
|
| +then
|
| + # Continuous builder
|
| + # Sets the codename to the user who built the image. This
|
| + # will help us figure out who did the build if a different
|
| + # person is debugging the system.
|
| + export CHROMEOS_VERSION_CODENAME="$USER"
|
| +
|
| + export CHROMEOS_VERSION_NAME="Chromium OS"
|
| + export CHROMEOS_VERSION_TRACK="buildbot-build"
|
| + export CHROMEOS_VERSION_AUSERVER="http://$HOSTNAME:8080/update"
|
| + export CHROMEOS_VERSION_DEVSERVER="http://$HOSTNAME:8080"
|
| else
|
| - # Continuous builds and developer hand-builds
|
| - export_developer_version
|
| - export_version_string
|
| + # Developer hand-builds
|
| + # Sets the codename to the user who built the image. This
|
| + # will help us figure out who did the build if a different
|
| + # person is debugging the system.
|
| + export CHROMEOS_VERSION_CODENAME="$USER"
|
| +
|
| export CHROMEOS_VERSION_NAME="Chromium OS"
|
| export CHROMEOS_VERSION_TRACK="developer-build"
|
| - HOSTNAME=$(hostname)
|
| export CHROMEOS_VERSION_AUSERVER="http://$HOSTNAME:8080/update"
|
| export CHROMEOS_VERSION_DEVSERVER="http://$HOSTNAME:8080"
|
| fi
|
|
|
| +# Version string. Not indentied to appease bash.
|
| +export CHROMEOS_VERSION_STRING=\
|
| +"${CHROMEOS_VERSION_MAJOR}.${CHROMEOS_VERSION_MINOR}"\
|
| +".${CHROMEOS_VERSION_BRANCH}.${CHROMEOS_VERSION_PATCH}"
|
| +
|
| # Print version info.
|
| echo "ChromeOS version information:"
|
| -env | grep "^CHROMEOS_VERSION" | sed 's/^/ /'
|
| +env | egrep "^CHROMEOS_VERSION" | sed 's/^/ /'
|
|
|