mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-05 12:16:41 +02:00
Moving chromeos_version.sh to chromiumos_overlay.
BUG=chromium-os:9714 TEST= Review URL: http://codereview.chromium.org/5513009 Change-Id: Ib569fe59f4e14551b198568b24014208b5d65647
This commit is contained in:
parent
fdefe8664b
commit
48db5d2068
@ -287,7 +287,8 @@ def _WipeOldOutput(buildroot):
|
||||
|
||||
def _GetChromeOSVersion(buildroot):
|
||||
"""Returns the tuple version of the Chrome OS version of the buildroot."""
|
||||
cwd = os.path.join(buildroot, 'src', 'scripts')
|
||||
cwd = os.path.join(buildroot, 'src', 'third_party', 'chromiumos-overlay',
|
||||
'chromeos', 'config')
|
||||
version_cmd = './chromeos_version.sh'
|
||||
output = RunCommand(version_cmd, cwd=cwd, redirect_stdout=True,
|
||||
redirect_stderr=True)
|
||||
|
||||
@ -163,7 +163,7 @@ if [ "${FLAGS_fast}" -eq "${FLAGS_TRUE}" ]; then
|
||||
fi
|
||||
|
||||
# Determine build version.
|
||||
. "${SCRIPTS_DIR}/chromeos_version.sh"
|
||||
. ${SRC_ROOT}/third_party/chromiumos-overlay/chromeos/config/chromeos_version.sh
|
||||
|
||||
# Configure extra USE or packages for this type of build.
|
||||
EXTRA_PACKAGES=""
|
||||
|
||||
@ -1,93 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
# ChromeOS version information
|
||||
#
|
||||
# This file is usually sourced by other build scripts, but can be run
|
||||
# directly to see what it would do.
|
||||
#
|
||||
# Version numbering scheme is much like Chrome's, with the addition of
|
||||
# double-incrementing branch number so trunk is always odd.
|
||||
|
||||
HOSTNAME=$(hostname)
|
||||
#############################################################################
|
||||
# SET VERSION NUMBERS
|
||||
#############################################################################
|
||||
# Major/minor versions.
|
||||
# Primarily for product marketing.
|
||||
export CHROMEOS_VERSION_MAJOR=0
|
||||
export CHROMEOS_VERSION_MINOR=9
|
||||
|
||||
# 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=131
|
||||
|
||||
# Patch number.
|
||||
# Increment by 1 each release on a branch.
|
||||
# Reset to 0 when increasing branch number.
|
||||
export CHROMEOS_VERSION_PATCH=0
|
||||
|
||||
# Codename of this version.
|
||||
export CHROMEOS_VERSION_CODENAME=""
|
||||
|
||||
#############################################################################
|
||||
# SET VERSION STRINGS
|
||||
#############################################################################
|
||||
# Official builds must set
|
||||
# CHROMEOS_OFFICIAL=1
|
||||
# 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 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
|
||||
# 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"
|
||||
export CHROMEOS_VERSION_AUSERVER="http://$HOSTNAME:8080/update"
|
||||
export CHROMEOS_VERSION_DEVSERVER="http://$HOSTNAME:8080"
|
||||
# Overwrite CHROMEOS_VERSION_PATCH with a date string for use by auto-updater
|
||||
export CHROMEOS_VERSION_PATCH=$(date +%Y_%m_%d_%H%M)
|
||||
fi
|
||||
|
||||
# Version string. Not indentied to appease bash.
|
||||
export CHROMEOS_VERSION_STRING=\
|
||||
"${CHROMEOS_VERSION_MAJOR}.${CHROMEOS_VERSION_MINOR}"\
|
||||
".${CHROMEOS_VERSION_BRANCH}.${CHROMEOS_VERSION_PATCH}"
|
||||
|
||||
# Set CHROME values (Used for releases) to pass to chromeos-chrome-bin ebuild
|
||||
# URL to chrome archive
|
||||
export CHROME_BASE=
|
||||
# export CHROME_VERSION from incoming value or NULL and let ebuild default
|
||||
export CHROME_VERSION="$CHROME_VERSION"
|
||||
|
||||
# Print (and remember) version info.
|
||||
echo "ChromeOS version information:"
|
||||
logvers="/tmp/version_${CHROMEOS_VERSION_STRING}"
|
||||
env | egrep '^CHROMEOS_VERSION|CHROME_' | tee $logvers | sed 's/^/ /'
|
||||
Loading…
x
Reference in New Issue
Block a user