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

Unified Diff: gce/uploader_iteration.sh

Issue 954693002: Store each file as "hash/<sha1>", list of hashes as "meta/@<rev>" and serve them at "serve_file/@<r… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/chrome-devtools-frontend
Patch Set: rebase Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gae/main.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gce/uploader_iteration.sh
diff --git a/gce/uploader_iteration.sh b/gce/uploader_iteration.sh
index 9003ea0cc2b7a51837e4b8e838fbfc1629e3b160..ce2e0835b6af0995dd8ee55dd3d01afa42661b08 100755
--- a/gce/uploader_iteration.sh
+++ b/gce/uploader_iteration.sh
@@ -62,7 +62,9 @@ for REVISION in $REVISION_LIST; do
fi
ZIPS_DIR="$LOCAL_STORAGE_DIR/zips"
REVS_DIR="$LOCAL_STORAGE_DIR/revs"
- mkdir -p $ZIPS_DIR $REVS_DIR
+ META_DIR="$LOCAL_STORAGE_DIR/meta"
+ HASH_DIR="$LOCAL_STORAGE_DIR/hash"
+ mkdir -p $ZIPS_DIR $REVS_DIR $META_DIR $HASH_DIR
if echo "$BLINK_REVISIONS_BLACKLIST" | grep -w $REVISION; then
echo "Revision $REVISION is in the blacklist, skipping over"
@@ -129,6 +131,15 @@ EOF
find -type f -not -name $MANIFEST_FILE_NAME -print | sed -e 's#^\./##' >> $MANIFEST_FILE_NAME
zip -9r $ZIP_FILE * || exit $EXIT_ZIP_FRONTEND
+
+ # Copy each file to hash/<sha1>, write <sha1>:<path> to meta file.
+ META_FILE_NAME="$META_DIR/@$REVISION"
+ for FILE_NAME in $(find -type f); do
+ FILE_SHA1=$(sha1sum $FILE_NAME | awk '{print $1}')
+ cp $FILE_NAME "$HASH_DIR/$FILE_SHA1"
+ echo "$FILE_SHA1:${FILE_NAME##./}" >> $META_FILE_NAME
+ done;
+
popd
ZIP_SHA1=$(sha1sum $ZIP_FILE | awk '{print $1}')
« no previous file with comments | « gae/main.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698