Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(479)

Side by Side Diff: src/scripts/archive_build.sh

Issue 2111015: Do not delete src_image if --notest_mod is set. (Closed) Base URL: ssh://git@chromiumos-git//chromeos
Patch Set: Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 "--factory" 142 "--factory"
143 fi 143 fi
144 144
145 if [ $FLAGS_factory_install_mod -eq $FLAGS_TRUE ] 145 if [ $FLAGS_factory_install_mod -eq $FLAGS_TRUE ]
146 then 146 then
147 echo "Modifying image for factory install" 147 echo "Modifying image for factory install"
148 do_chroot_mod "${FLAGS_from}/chromiumos_factory_install_image.bin" \ 148 do_chroot_mod "${FLAGS_from}/chromiumos_factory_install_image.bin" \
149 "--factory_install" 149 "--factory_install"
150 fi 150 fi
151 151
152 # Remove the developer build. 152 # Remove the developer build if test image is also built.
153 rm -f ${SRC_IMAGE} 153 if [ $FLAGS_test_mod -eq $FLAGS_TRUE ] ; then
154 rm -f ${SRC_IMAGE}
155 fi
154 156
155 # Zip the build 157 # Zip the build
156 echo "Compressing and archiving build..." 158 echo "Compressing and archiving build..."
157 cd "$FLAGS_from" 159 cd "$FLAGS_from"
158 MANIFEST=`ls | grep -v factory` 160 MANIFEST=`ls | grep -v factory`
159 zip -r "${ZIPFILE}" ${MANIFEST} 161 zip -r "${ZIPFILE}" ${MANIFEST}
160 162
161 if [ $FLAGS_factory_test_mod -eq $FLAGS_TRUE ] || \ 163 if [ $FLAGS_factory_test_mod -eq $FLAGS_TRUE ] || \
162 [ $FLAGS_factory_install_mod -eq $FLAGS_TRUE ] 164 [ $FLAGS_factory_install_mod -eq $FLAGS_TRUE ]
163 then 165 then
(...skipping 21 matching lines...) Expand all
185 if [ $FLAGS_keep_max -gt 0 ] 187 if [ $FLAGS_keep_max -gt 0 ]
186 then 188 then
187 echo "Deleting old builds (all but the newest ${FLAGS_keep_max})..." 189 echo "Deleting old builds (all but the newest ${FLAGS_keep_max})..."
188 cd "$FLAGS_to" 190 cd "$FLAGS_to"
189 # +2 because line numbers start at 1 and need to skip LATEST file 191 # +2 because line numbers start at 1 and need to skip LATEST file
190 rm -rf `ls -t1 | tail --lines=+$(($FLAGS_keep_max + 2))` 192 rm -rf `ls -t1 | tail --lines=+$(($FLAGS_keep_max + 2))`
191 cd - 193 cd -
192 fi 194 fi
193 195
194 echo "Done." 196 echo "Done."
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698