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 # Script to archive build results. Used by the buildbots. | 7 # Script to archive build results. Used by the buildbots. |
8 | 8 |
9 # Load common constants. This should be the first executable line. | 9 # Load common constants. This should be the first executable line. |
10 # The path to common.sh should be relative to your script's location. | 10 # The path to common.sh should be relative to your script's location. |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 "${SCRIPTS_DIR}/archive_hwqual" --from "${OUTDIR}" \ | 262 "${SCRIPTS_DIR}/archive_hwqual" --from "${OUTDIR}" \ |
263 --output_tag "${HWQUAL_NAME}" | 263 --output_tag "${HWQUAL_NAME}" |
264 gsutil_archive "${OUTDIR}/${HWQUAL_NAME}.tar.bz2" \ | 264 gsutil_archive "${OUTDIR}/${HWQUAL_NAME}.tar.bz2" \ |
265 "${LAST_CHANGE}/${HWQUAL_NAME}.tar.bz2" | 265 "${LAST_CHANGE}/${HWQUAL_NAME}.tar.bz2" |
266 fi | 266 fi |
267 | 267 |
268 # Construct prebuilt upload command. | 268 # Construct prebuilt upload command. |
269 # This will upload prebuilt packages to Google Storage. | 269 # This will upload prebuilt packages to Google Storage. |
270 prebuilt_cmd="${SCRIPTS_DIR}/prebuilt.py" | 270 prebuilt_cmd="${SCRIPTS_DIR}/prebuilt.py" |
271 prebuilt_cmd="$prebuilt_cmd -u gs://chromeos-prebuilt --git-sync -V master" | 271 prebuilt_cmd="$prebuilt_cmd -u gs://chromeos-prebuilt --git-sync -V master" |
272 prebuilt_cmd="$prebuilt_cmd -p $(readlink -f ../..) -b ${FLAGS_board}" | 272 prebuilt_cmd="$prebuilt_cmd -p $(readlink -f ../../../..) -b ${FLAGS_board}" |
273 | 273 |
274 if [ "${FLAGS_BOARD}" == "x86-generic" ] | 274 if [ "${FLAGS_BOARD}" == "x86-generic" ] |
275 then | 275 then |
276 prebuilt_cmd="$prebuilt_cmd --sync-host" | 276 prebuilt_cmd="$prebuilt_cmd --sync-host" |
277 fi | 277 fi |
278 | 278 |
279 echo "Running $prebuilt_cmd" | 279 echo "Running $prebuilt_cmd" |
280 $prebuilt_cmd | 280 $prebuilt_cmd |
281 | 281 |
282 gsutil_archive "${ZIPFILE}" "${LAST_CHANGE}/${FLAGS_zipname}" | 282 gsutil_archive "${ZIPFILE}" "${LAST_CHANGE}/${FLAGS_zipname}" |
(...skipping 24 matching lines...) Expand all Loading... |
307 if [ $FLAGS_keep_max -gt 0 ] | 307 if [ $FLAGS_keep_max -gt 0 ] |
308 then | 308 then |
309 echo "Deleting old builds (all but the newest ${FLAGS_keep_max})..." | 309 echo "Deleting old builds (all but the newest ${FLAGS_keep_max})..." |
310 cd "$FLAGS_to" | 310 cd "$FLAGS_to" |
311 # +2 because line numbers start at 1 and need to skip LATEST file | 311 # +2 because line numbers start at 1 and need to skip LATEST file |
312 rm -rf `ls -t1 | tail --lines=+$(($FLAGS_keep_max + 2))` | 312 rm -rf `ls -t1 | tail --lines=+$(($FLAGS_keep_max + 2))` |
313 cd - | 313 cd - |
314 fi | 314 fi |
315 | 315 |
316 echo "Done." | 316 echo "Done." |
OLD | NEW |