| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 zip -r "$ZIPFILE" * | 107 zip -r "$ZIPFILE" * |
| 108 cd - | 108 cd - |
| 109 | 109 |
| 110 # Update LATEST file | 110 # Update LATEST file |
| 111 echo "$LAST_CHANGE" > "${FLAGS_to}/LATEST" | 111 echo "$LAST_CHANGE" > "${FLAGS_to}/LATEST" |
| 112 | 112 |
| 113 # Make sure files are readable | 113 # Make sure files are readable |
| 114 chmod 644 "$ZIPFILE" "${FLAGS_to}/LATEST" | 114 chmod 644 "$ZIPFILE" "${FLAGS_to}/LATEST" |
| 115 chmod 755 "$OUTDIR" | 115 chmod 755 "$OUTDIR" |
| 116 | 116 |
| 117 if [ $FLAGS_official_build -eq $FLAGS_TRUE ] |
| 118 then |
| 119 echo "Creating hwqual archive" |
| 120 HWQUAL_NAME="chromeos-hwqual-${FLAGS_board}-${CHROMEOS_VERSION_STRING}" |
| 121 "${SCRIPTS_DIR}/archive_hwqual" --from "${OUTDIR}" \ |
| 122 --output_tag "${HWQUAL_NAME}" |
| 123 fi |
| 124 |
| 117 # Purge old builds if necessary | 125 # Purge old builds if necessary |
| 118 if [ $FLAGS_keep_max -gt 0 ] | 126 if [ $FLAGS_keep_max -gt 0 ] |
| 119 then | 127 then |
| 120 echo "Deleting old builds (all but the newest ${FLAGS_keep_max})..." | 128 echo "Deleting old builds (all but the newest ${FLAGS_keep_max})..." |
| 121 cd "$FLAGS_to" | 129 cd "$FLAGS_to" |
| 122 # +2 because line numbers start at 1 and need to skip LATEST file | 130 # +2 because line numbers start at 1 and need to skip LATEST file |
| 123 rm -rf `ls -t1 | tail --lines=+$(($FLAGS_keep_max + 2))` | 131 rm -rf `ls -t1 | tail --lines=+$(($FLAGS_keep_max + 2))` |
| 124 cd - | 132 cd - |
| 125 fi | 133 fi |
| 126 | 134 |
| 127 echo "Done." | 135 echo "Done." |
| OLD | NEW |