Start versioning Gitiles with build numbers

We do not currently have the notion of a stable release or API; the
largest downstream consumer of Gitiles, googlesource.com, runs
basically at master. Until such time as we do have stable version
numbers, use 0.1 with incremental build numbers as often as we need
to release.

For valid Maven numbering schemes, see:
http://mojo.codehaus.org/versions-maven-plugin/version-rules.html

Change-Id: I732dfbb7ec5c15ff7ee8197e16ce1fb8617e8e5e
diff --git a/BUCK b/BUCK
index 043aa87..ff79151 100644
--- a/BUCK
+++ b/BUCK
@@ -1,6 +1,5 @@
 include_defs('//VERSION')
 include_defs('//bucklets/maven_package.bucklet')
-TYPE = 'snapshot' if GITILES_VERSION.endswith('-SNAPSHOT') else 'release'
 
 DEPS = [
   '//gitiles-dev:dev',
@@ -21,7 +20,7 @@
 
 maven_package(
   repository = 'gerrit-api-repository',
-  url = 'gs://gerrit-api/%s' % TYPE,
+  url = 'gs://gerrit-api/release',
   version = GITILES_VERSION,
   jar = {'gitiles-servlet': '//gitiles-servlet:servlet'},
   src = {'gitiles-servlet': '//gitiles-servlet:src'},
diff --git a/VERSION b/VERSION
index 1302b48..b457c4e 100644
--- a/VERSION
+++ b/VERSION
@@ -1,6 +1,8 @@
 # Maven style API version (e.g. '2.x-SNAPSHOT').
-# Used by :imaven_install when talking to the
-# destination repository.
 #
-GITILES_VERSION = '1.0'
+# Used by :install and :deploy when talking to the destination repository. As
+# we currently have no stable releases, we use the "build number" scheme
+# described at:
+# http://mojo.codehaus.org/versions-maven-plugin/version-rules.html
+GITILES_VERSION = '0.1-1'
 
diff --git a/fake_pom_deploy.xml b/fake_pom_deploy.xml
index c4695c6..c63229a 100644
--- a/fake_pom_deploy.xml
+++ b/fake_pom_deploy.xml
@@ -2,7 +2,7 @@
   <modelVersion>4.0.0</modelVersion>
   <groupId>com.google.gitiles</groupId>
   <artifactId>Gitiles-Simple-Git-Repository-Browser</artifactId>
-  <version>1</version>
+  <version>1</version> <!-- Do not edit; see VERSION. -->
   <distributionManagement>
     <repository>
       <id>gerrit-api-repository</id>