version.py: Also update the VERSION file

When updating the version, the VERSION file also needs to be updated.

The documentation implies that the version.py file does that, but it
doesn't.

Update the version.py file tool to do it.

Change-Id: I8671688e819608659685b79a553c592604093890
diff --git a/tools/version.py b/tools/version.py
index a994bd8..28f6b65 100755
--- a/tools/version.py
+++ b/tools/version.py
@@ -19,6 +19,12 @@
 import re
 import sys
 
+version_text = """# Maven style API version (e.g. '2.x-SNAPSHOT').
+# Used by :api_install and :api_deploy targets
+# when talking to the destination repository.
+#
+GERRIT_VERSION = '%s'
+"""
 parser = OptionParser()
 opts, args = parser.parse_args()
 
@@ -49,3 +55,9 @@
       outfile.write(outxml)
   except IOError as err:
     print('error updating %s: %s' % (pom, err), file=sys.stderr)
+
+try:
+  with open('VERSION', "w") as version_file:
+    version_file.write(version_text % new_version)
+except IOError as err:
+  print('error updating VERSION: %s' % err, file=sys.stderr)