Only skip uploading of addin if the file already exists on google storage.

The means the periodic builder can upload a revision if the
main builder happened flake and not upload first.

R=binji@chromium.org

Review URL: https://codereview.chromium.org/288983005

git-svn-id: https://nativeclient-sdk.googlecode.com/svn/trunk/src@1574 050acbb0-2703-11df-ab0a-9f3f633ae91d
diff --git a/visual_studio/NativeClientVSAddIn/buildbot_run.py b/visual_studio/NativeClientVSAddIn/buildbot_run.py
index bc786a3..050feb9 100755
--- a/visual_studio/NativeClientVSAddIn/buildbot_run.py
+++ b/visual_studio/NativeClientVSAddIn/buildbot_run.py
@@ -159,16 +159,6 @@
 
 
 def StepArchive(revision):
-  # The BUILDBOT_REVISION environment variable gets set to the revsion that
-  # triggered a given build.  For periodic schedulers this will be an empty
-  # string since they are not triggered by a particular revision.  We don't
-  # want to upload the build results to google storage for periodic schedulers
-  # so we skip this step in that case.
-  triggered_revision = os.environ.get('BUILDBOT_REVISION')
-  if triggered_revision == '' or triggered_revision is None:
-    Log('Skipping archive step: BUILDBOT_REVISION not set')
-    return
-
   Log('@@@BUILD_STEP archive build [r%s]@@@' % revision)
   basename = 'vs_addin.tgz'
   remote_name = '%s/%s/%s' % (GSPATH, revision, basename)
@@ -179,9 +169,8 @@
 
   # Check for existing file on google storage
   if RunCommand(gsutil + ['ls', gs_remote_name], check_return_code=False) == 0:
-    Log('File already exists on google storage: %s' % gs_remote_name)
-    Log('@@@STEP_FAILURE@@@')
-    sys.exit(1)
+    Log('Skipping archive step: file already exists on google storage')
+    return
 
   # Upload to google storage
   cmd = gsutil + ['cp', '-a', 'public-read', local_filename, gs_remote_name]