Enable uploading a development hash to google3.

This CL also avoids unneeded login prompts.

Change-Id: I6c9c719bba42b88910c41e8d1d214d714a24d5f8
diff --git a/tools/r8_release.py b/tools/r8_release.py
index d60baa0..53a7dc9 100755
--- a/tools/r8_release.py
+++ b/tools/r8_release.py
@@ -324,8 +324,9 @@
 
 
 def download_file(version, file, dst):
+  dir = 'raw' if len(version) != 40 else 'raw/main'
   urllib.request.urlretrieve(
-      ('https://storage.googleapis.com/r8-releases/raw/%s/%s' % (version, file)),
+      ('https://storage.googleapis.com/r8-releases/%s/%s/%s' % (dir, version, file)),
       dst)
 
 def download_gfile(gfile, dst):
@@ -842,8 +843,7 @@
     sys.exit(1)
 
   if args.version and not 'dev' in args.version and args.google3:
-    print("You should not roll a release version into google 3")
-    sys.exit(1)
+    print("WARNING: You should not roll a release version into google 3")
 
   return args
 
diff --git a/tools/utils.py b/tools/utils.py
index 5d574ac..314fcd2 100644
--- a/tools/utils.py
+++ b/tools/utils.py
@@ -395,7 +395,9 @@
     tar.extractall(path=dirname)
 
 def check_gcert():
-  subprocess.check_call(['gcert'])
+  status = subprocess.call(['gcertstatus'])
+  if status != 0:
+    subprocess.check_call(['gcert'])
 
 # Note that gcs is eventually consistent with regards to list operations.
 # This is not a problem in our case, but don't ever use this method