OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 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 | 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 # Wrapper scripts around cros_mark_as_stable that marks all packages as stable | 7 # Wrapper scripts around cros_mark_as_stable that marks all packages as stable |
8 # that have CROS_WORKON_COMMIT that is different than the current HEAD commit | 8 # that have CROS_WORKON_COMMIT that is different than the current HEAD commit |
9 # of the corresponding git repository. | 9 # of the corresponding git repository. |
10 | 10 |
11 # Load common constants. This should be the first executable line. | 11 # Load common constants. This should be the first executable line. |
12 # The path to common.sh should be relative to your script's location. | 12 # The path to common.sh should be relative to your script's location. |
13 . "$(dirname "$0")/common.sh" | 13 . "$(dirname "$0")/common.sh" |
14 | 14 |
15 # Load common functions for workon scripts. | 15 # Load common functions for workon scripts. |
16 . "$(dirname "$0")/lib/cros_workon_common.sh" | 16 . "$(dirname "$0")/lib/cros_workon_common.sh" |
17 | 17 |
18 get_default_board | 18 get_default_board |
19 | 19 |
20 DEFINE_string board "${DEFAULT_BOARD}" \ | 20 DEFINE_string board "${DEFAULT_BOARD}" \ |
21 "The board to set package keywords for." | 21 "The board to set package keywords for." |
| 22 DEFINE_string tracking_branch "origin" \ |
| 23 "Used with commit to specify branch to track against." |
22 | 24 |
23 FLAGS "$@" || exit 1 | 25 FLAGS "$@" || exit 1 |
24 eval set -- "${FLAGS_ARGV}" | 26 eval set -- "${FLAGS_ARGV}" |
25 | 27 |
26 set -e | 28 set -e |
27 | 29 |
28 BOARD_DIR=/build/"${FLAGS_board}" | 30 BOARD_DIR=/build/"${FLAGS_board}" |
29 EQUERYCMD=equery-"${FLAGS_board}" | 31 EQUERYCMD=equery-"${FLAGS_board}" |
30 EBUILDCMD=ebuild-"${FLAGS_board}" | 32 EBUILDCMD=ebuild-"${FLAGS_board}" |
31 | 33 |
(...skipping 26 matching lines...) Expand all Loading... |
58 COMMIT_ID_LIST="${COMMIT_ID_LIST} ${head_commit}" | 60 COMMIT_ID_LIST="${COMMIT_ID_LIST} ${head_commit}" |
59 elif [[ ${head_commit} = ${egit_commit} ]]; then | 61 elif [[ ${head_commit} = ${egit_commit} ]]; then |
60 info "Commit id's match for ${package}" | 62 info "Commit id's match for ${package}" |
61 fi | 63 fi |
62 done | 64 done |
63 | 65 |
64 info "Candidate package list ${PACKAGE_LIST}" | 66 info "Candidate package list ${PACKAGE_LIST}" |
65 info "With commit id list ${COMMIT_ID_LIST}" | 67 info "With commit id list ${COMMIT_ID_LIST}" |
66 | 68 |
67 ./cros_mark_as_stable --board ${FLAGS_board} -p "${PACKAGE_LIST}" \ | 69 ./cros_mark_as_stable --board ${FLAGS_board} -p "${PACKAGE_LIST}" \ |
68 -i "${COMMIT_ID_LIST}" commit || \ | 70 -i "${COMMIT_ID_LIST}" -t ${FLAGS_tracking_branch} commit || \ |
69 die "Could not mark all packages as stable" | 71 die "Could not mark all packages as stable" |
OLD | NEW |