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

Unified Diff: gce/uploader_iteration.sh

Issue 2308913002: DevTools Uploader: migrate to GN (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | 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 a243d6283b564cf5d46fc05769b7d4e03bd93558..0ae4240d686368274b13f9638fb4320ed389294d 100755
--- a/gce/uploader_iteration.sh
+++ b/gce/uploader_iteration.sh
@@ -25,7 +25,7 @@ unlock_git_repo() {
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
mark_step 'Moving to the source code directory'
-SOURCE_DIR=/uploader/src/chrome
+SOURCE_DIR=/uploader/src/chromium/src
cd "$SOURCE_DIR"
mark_step 'Updating chromium'
@@ -33,16 +33,8 @@ unlock_git_repo Chromium || exit $EXIT_CHROMIUM_UPDATE
git bisect reset || exit $EXIT_CHROMIUM_UPDATE
git reset --hard || exit $EXIT_CHROMIUM_UPDATE
git clean -df || exit $EXIT_CHROMIUM_UPDATE
-git checkout master || exit $EXIT_CHROMIUM_UPDATE
-git pull origin || exit $EXIT_CHROMIUM_UPDATE
-CHROMIUM_GYP_REVISION="$(cat DEPS | $SCRIPT_DIR/uploader_helper.py --find_project_revision='src/tools/gyp')"
-
-mark_step 'Updating gyp'
-pushd tools/gyp
-unlock_git_repo Gyp
-git fetch || exit $EXIT_GYP_UPDATE
-git reset --hard $CHROMIUM_GYP_REVISION || exit $EXIT_GYP_UPDATE
-popd
+git checkout -f master || exit $EXIT_CHROMIUM_UPDATE
+git pull -f origin || exit $EXIT_CHROMIUM_UPDATE
mark_step 'Figuring out the list of branches'
# Special branches.
@@ -122,23 +114,18 @@ for REVISION in $REVISION_LIST; do
echo "Processing $REVISION"
git reset --hard || exit $EXIT_BLINK_UPDATE
git clean -df || exit $EXIT_BLINK_UPDATE
- git checkout $REVISION || exit $EXIT_BLINK_UPDATE
-
- # Exclude "trunk" to work around branches that accidentally have a second
- # copy of Blink sources inside it. See http://crbug.com/450975
- pushd third_party/WebKit
- DEVTOOLS_GYP=$(find . -type f -name devtools.gyp -not -path "*/trunk/*")
- if [ -z "$DEVTOOLS_GYP" ]; then
- exit $EXIT_DEVTOOLS_GYP_FILE
- fi
- if [ -d ../../out ]; then
- rm -rf ../../out
+ git checkout -f $REVISION || exit $EXIT_BLINK_UPDATE
+ gclient sync -D -R || exit $EXIT_BLINK_UPDATE
+
+ echo "Running GN"
+ if [ -d out/Default ]; then
+ rm -rf out/Default
fi
- DEVTOOLS_DIR=$(dirname "$DEVTOOLS_GYP")
- #TODO: need to calculate depth and output paths based on DEVTOOLS_DIR nesting level
- GYP_GENERATORS=ninja ../../tools/gyp/gyp --toplevel-dir="$DEVTOOLS_DIR" --depth=../../../.. --generator-output=../../../.. "$DEVTOOLS_GYP" || exit $EXIT_GYP_DEVTOOLS
- popd
+ mkdir -p out/Default
+ echo "is_debug=false" > out/Default/args.gn
+ gn gen out/Default || exit $EXIT_GYP_DEVTOOLS
+ echo "Running ninja"
LASTCHANGE_FILE="build/util/LASTCHANGE"
echo "LASTCHANGE=$REVISION" > $LASTCHANGE_FILE
LASTCHANGE_BLINK_FILE="build/util/LASTCHANGE.blink"
@@ -149,6 +136,8 @@ for REVISION in $REVISION_LIST; do
ZIP_FILE=$(pwd)/out/$ZIP_FILE_NAME
pushd out/Default/resources/inspector
+
+ echo "Creating manifest"
# Create an AppCache manifest and patch devtools.html and / or inspector.html to point to it
MANIFEST_FILE_NAME=$REVISION.manifest
FALLBACK_ENTRIES=
@@ -173,8 +162,10 @@ EOF
echo "CACHE:" >> $MANIFEST_FILE_NAME
find -type f -not -name $MANIFEST_FILE_NAME -print | sed -e 's#^\./##' >> $MANIFEST_FILE_NAME
+ echo "Creating a zip file"
zip -9r $ZIP_FILE * || exit $EXIT_ZIP_FRONTEND
+ echo "Creating meta and hash files"
# 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
@@ -185,10 +176,12 @@ EOF
popd
+ echo "Creating revs file"
ZIP_SHA1=$(sha1sum $ZIP_FILE | awk '{print $1}')
mv $ZIP_FILE "$ZIPS_DIR/$ZIP_SHA1.zip"
echo "$ZIP_SHA1" > "$REVS_DIR/@$REVISION"
+ echo "Uploading to storage for revision $REVISION"
# Comment out the line below for testing.
- gsutil -m cp -R $LOCAL_STORAGE_DIR/* $GS_PATH || exit $EXIT_CS_UPLOAD
+ gsutil -m cp -n -R $LOCAL_STORAGE_DIR/* $GS_PATH || exit $EXIT_CS_UPLOAD
done
« 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