| OLD | NEW |
| (Empty) |
| 1 #!/bin/sh | |
| 2 | |
| 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | |
| 4 # Use of this source code is governed by a BSD-style license that can be | |
| 5 # found in the LICENSE file. | |
| 6 | |
| 7 # ChromeOS version information | |
| 8 # | |
| 9 # This file is usually sourced by other build scripts, but can be run | |
| 10 # directly to see what it would do. | |
| 11 # | |
| 12 # Version numbering scheme is much like Chrome's, with the addition of | |
| 13 # double-incrementing branch number so trunk is always odd. | |
| 14 | |
| 15 HOSTNAME=$(hostname) | |
| 16 ############################################################################# | |
| 17 # SET VERSION NUMBERS | |
| 18 ############################################################################# | |
| 19 # Major/minor versions. | |
| 20 # Primarily for product marketing. | |
| 21 export CHROMEOS_VERSION_MAJOR=0 | |
| 22 export CHROMEOS_VERSION_MINOR=9 | |
| 23 | |
| 24 # Branch number. | |
| 25 # Increment by 1 in a new release branch. | |
| 26 # Increment by 2 in trunk after making a release branch. | |
| 27 # Does not reset on a major/minor change (always increases). | |
| 28 # (Trunk is always odd; branches are always even). | |
| 29 export CHROMEOS_VERSION_BRANCH=131 | |
| 30 | |
| 31 # Patch number. | |
| 32 # Increment by 1 each release on a branch. | |
| 33 # Reset to 0 when increasing branch number. | |
| 34 export CHROMEOS_VERSION_PATCH=0 | |
| 35 | |
| 36 # Codename of this version. | |
| 37 export CHROMEOS_VERSION_CODENAME="" | |
| 38 | |
| 39 ############################################################################# | |
| 40 # SET VERSION STRINGS | |
| 41 ############################################################################# | |
| 42 # Official builds must set | |
| 43 # CHROMEOS_OFFICIAL=1 | |
| 44 # Note that ${FOO:-0} means default-to-0-if-unset; ${FOO:?} means die-if-unset. | |
| 45 if [ ${CHROMEOS_OFFICIAL:-0} -eq 1 ] | |
| 46 then | |
| 47 # Official builds (i.e., buildbot) | |
| 48 export CHROMEOS_VERSION_NAME="Chrome OS" | |
| 49 export CHROMEOS_VERSION_TRACK="dev-channel" | |
| 50 export CHROMEOS_VERSION_AUSERVER="https://tools.google.com/service/update2" | |
| 51 export CHROMEOS_VERSION_DEVSERVER="" | |
| 52 elif [ "$USER" = "chrome-bot" ] | |
| 53 then | |
| 54 # Continuous builder | |
| 55 # Sets the codename to the user who built the image. This | |
| 56 # will help us figure out who did the build if a different | |
| 57 # person is debugging the system. | |
| 58 export CHROMEOS_VERSION_CODENAME="$USER" | |
| 59 | |
| 60 export CHROMEOS_VERSION_NAME="Chromium OS" | |
| 61 export CHROMEOS_VERSION_TRACK="buildbot-build" | |
| 62 export CHROMEOS_VERSION_AUSERVER="http://$HOSTNAME:8080/update" | |
| 63 export CHROMEOS_VERSION_DEVSERVER="http://$HOSTNAME:8080" | |
| 64 else | |
| 65 # Developer hand-builds | |
| 66 # Sets the codename to the user who built the image. This | |
| 67 # will help us figure out who did the build if a different | |
| 68 # person is debugging the system. | |
| 69 export CHROMEOS_VERSION_CODENAME="$USER" | |
| 70 | |
| 71 export CHROMEOS_VERSION_NAME="Chromium OS" | |
| 72 export CHROMEOS_VERSION_TRACK="developer-build" | |
| 73 export CHROMEOS_VERSION_AUSERVER="http://$HOSTNAME:8080/update" | |
| 74 export CHROMEOS_VERSION_DEVSERVER="http://$HOSTNAME:8080" | |
| 75 # Overwrite CHROMEOS_VERSION_PATCH with a date string for use by auto-updater | |
| 76 export CHROMEOS_VERSION_PATCH=$(date +%Y_%m_%d_%H%M) | |
| 77 fi | |
| 78 | |
| 79 # Version string. Not indentied to appease bash. | |
| 80 export CHROMEOS_VERSION_STRING=\ | |
| 81 "${CHROMEOS_VERSION_MAJOR}.${CHROMEOS_VERSION_MINOR}"\ | |
| 82 ".${CHROMEOS_VERSION_BRANCH}.${CHROMEOS_VERSION_PATCH}" | |
| 83 | |
| 84 # Set CHROME values (Used for releases) to pass to chromeos-chrome-bin ebuild | |
| 85 # URL to chrome archive | |
| 86 export CHROME_BASE= | |
| 87 # export CHROME_VERSION from incoming value or NULL and let ebuild default | |
| 88 export CHROME_VERSION="$CHROME_VERSION" | |
| 89 | |
| 90 # Print (and remember) version info. | |
| 91 echo "ChromeOS version information:" | |
| 92 logvers="/tmp/version_${CHROMEOS_VERSION_STRING}" | |
| 93 env | egrep '^CHROMEOS_VERSION|CHROME_' | tee $logvers | sed 's/^/ /' | |
| OLD | NEW |