From 0f33c08d8d46eba8165715a0995841a975badfd4 Mon Sep 17 00:00:00 2001
From: Kai Chen <chenkaidev@gmail.com>
Date: Tue, 5 May 2020 22:11:57 +0800
Subject: [PATCH] release the last version of v1.x (#2617)

---
 mmdet/VERSION |  1 +
 setup.py      | 17 +++++++----------
 2 files changed, 8 insertions(+), 10 deletions(-)
 create mode 100644 mmdet/VERSION

diff --git a/mmdet/VERSION b/mmdet/VERSION
new file mode 100644
index 00000000..26aaba0e
--- /dev/null
+++ b/mmdet/VERSION
@@ -0,0 +1 @@
+1.2.0
diff --git a/setup.py b/setup.py
index 5a5ddbe0..fda26bd3 100755
--- a/setup.py
+++ b/setup.py
@@ -14,15 +14,6 @@ def readme():
     return content
 
 
-MAJOR = 1
-MINOR = 1
-PATCH = 0
-SUFFIX = ''
-if PATCH != '':
-    SHORT_VERSION = '{}.{}.{}{}'.format(MAJOR, MINOR, PATCH, SUFFIX)
-else:
-    SHORT_VERSION = '{}.{}{}'.format(MAJOR, MINOR, SUFFIX)
-
 version_file = 'mmdet/version.py'
 
 
@@ -73,12 +64,18 @@ def write_version_py():
 
 __version__ = '{}'
 short_version = '{}'
+version_info = ({})
 """
     sha = get_hash()
+    with open('mmdet/VERSION', 'r') as f:
+        SHORT_VERSION = f.read().strip()
+    VERSION_INFO = ', '.join(SHORT_VERSION.split('.'))
     VERSION = SHORT_VERSION + '+' + sha
 
+    version_file_str = content.format(time.asctime(), VERSION, SHORT_VERSION,
+                                      VERSION_INFO)
     with open(version_file, 'w') as f:
-        f.write(content.format(time.asctime(), VERSION, SHORT_VERSION))
+        f.write(version_file_str)
 
 
 def get_version():
-- 
GitLab