OLD | NEW |
1 #!/bin/bash -e | 1 #!/bin/bash -e |
2 | 2 |
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 if [[ -z "$version_full" ]]; then | 7 if [[ -z "$version_full" ]]; then |
8 src_root=./../../../.. | 8 src_root=./../../../.. |
9 version_helper=$src_root/chrome/tools/build/version.py | 9 version_helper=$src_root/chrome/tools/build/version.py |
10 version_base=$($version_helper -f $src_root/remoting/VERSION \ | 10 version_base=$($version_helper -f $src_root/remoting/VERSION \ |
11 -t "@MAJOR@.@MINOR@") | 11 -t "@MAJOR@.@MINOR@") |
12 version_build=$($version_helper -f $src_root/chrome/VERSION \ | 12 version_build=$($version_helper -f $src_root/chrome/VERSION \ |
13 -t "@BUILD@.@PATCH@") | 13 -t "@BUILD@.@PATCH@") |
14 version_full="$version_base.$version_build" | 14 version_full="$version_base.$version_build" |
15 fi | 15 fi |
16 | 16 |
17 if !(echo $version_full | grep -E \ | 17 if [[ ! "$version_full" =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then |
18 "^[[:digit:]]+.[[:digit:]]+.[[:digit:]]+.[[:digit:]]+$" > /dev/null); then | |
19 echo "Error: Invalid \$version_full value: $version_full" >&2 | 18 echo "Error: Invalid \$version_full value: $version_full" >&2 |
20 exit 1 | 19 exit 1 |
21 fi | 20 fi |
22 | 21 |
23 echo "Building version $version_full" | 22 echo "Building version $version_full" |
24 | 23 |
25 # Create a fresh debian/changelog. | 24 # Create a fresh debian/changelog. |
26 export DEBEMAIL="The Chromium Authors <chromium-dev@chromium.org>" | 25 export DEBEMAIL="The Chromium Authors <chromium-dev@chromium.org>" |
27 rm -f debian/changelog | 26 rm -f debian/changelog |
28 debchange --create \ | 27 debchange --create \ |
29 --package chrome-remote-desktop \ | 28 --package chrome-remote-desktop \ |
30 --distribution lucid \ | 29 --distribution lucid \ |
31 --newversion "$version_full" \ | 30 --newversion "$version_full" \ |
32 "New Debian package" | 31 "New Debian package" |
33 | 32 |
34 dpkg-buildpackage -b -us -uc | 33 dpkg-buildpackage -b -us -uc |
OLD | NEW |